I'm trying to parse out some images from blog posts to create little thumbnails. One particular image is failing on the web server but not on my laptop.
Here's some test code:
$vars = getimagesize( 'http://thebestcamera.com/blog/wp-content/uploads/2010/02/img_0084-150x150.png' );
var_dump( $vars );
The error log does:
PHP Warning: getimagesize(http://thebestcamera.com/blog/wp-content/uploads/2010/02/img_0084-150x150.png) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
If I use curl I get a 404 from the server but I get the image if I do it from the laptop:
curl http://thebestcamera.com/blog/wp-content/uploads/2010/02/img_0084-150x150.png
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /blog/wp-content/uploads/2010/02/img_0084-150x150.png was not found on this server.</p>
<hr>
<address>Apache/2.2.3 (CentOS) Server at thebestcamera.com Port 80</address>
Any thoughts?