Jump to content

Recommended Posts

Posted
I'm wondering if I run this:

$hash = getimagesize("http://www.someotherserver_notmine.com/image.jpg");

 

does the getimagesize command require the executing server to actually fetch the image from the hosting server? or does it simply fetch header information for that image?

The getimagesize() PHP function retrieves the entire image when called on an image URL.

 

does it count against my bandwidth?

Yes, it does. :lol:

Posted
I'm wondering if I run this:

$hash = getimagesize("http://www.someotherserver_notmine.com/image.jpg");

 

does the getimagesize command require the executing server to actually fetch the image from the hosting server? or does it simply fetch header information for that image?

The getimagesize() PHP function retrieves the entire image when called on an image URL.

 

does it count against my bandwidth?

Yes, it does. :lol:

 

 

 

I was afraid of that. thanks for the insights, I couldn't find that answer anywhere.

Posted

No problem - I coudn't find an answer that was recent enough to be relied on, but it mentioned a method to prove what getimagesize() does easily: Write a simple script that uses getimagesize() on a large image. After running the script, the full image retrieval by getimagesize() will be shown in the Apache access log.

Posted

I think you can call getimagesize() with a simple filesystem path and it will simply get the image directly from the filesystem instead of generating an HTTP request for it and spending some bandwidth :dance:

Posted
I think you can call getimagesize() with a simple filesystem path and it will simply get the image directly from the filesystem instead of generating an HTTP request for it and spending some bandwidth :P

That's correct, but the image does have to be stored on the local server in order to do so. :dance:

Posted
$hash = getimagesize("http://www.someotherserver_notmine.com/image.jpg");

 

You're right, David. Sorry, I should have read mangarevolution's post more carefully. ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...