There is this werid thing that seems to be going wrong with the getimagesize() function.
According to the documentation, the getimagesize() function suppose to work even with a remote image file. So say if I use it this way, getimagesize(“http://www.somewebsite.com/image.jpg”); it would still work.
It was working some months ago on one of my scripts until recently when I try to run the script again, it doesn’t work anymore. What’s more is the URL of the image that I put in the getimagesize() function is an image in the same sandbox as the script. I have something like getimagesize(“http://localhost/testsite/images/testimage.jpg”);
I have no idea why it doesn’t work and it throws an error on the page after getting the execution timeout.
Warning: getimagesize(http://localhost/testsite/images/testimage.jpg) [function.getimagesize]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wamp\htdocs\ estsite\showimage.php on line 127
It however works when I have the argument as a relative path this way: getimagesize(“images/testimage.jpg”);
Does anyone has any idea why it didn’t work, even when the URL of the image is actually linking back to an image on the same sandbox?