Unable to download image with Curl.

timtation

Registered Member
Joined
Dec 15, 2010
Messages
59
Reaction score
0
I have an image on a remote server that I need to download with Curl. Pretty simple stuff. The odd thing is... I can view the image in my browser, but as soon as I attempt to download the image with Curl, instead of getting image data, the server responses back with an 'Error... Unavailable.'

I am already setting the User Agent of my Curl request to something else, so I don't think that's it.

Does anyone have any other ideas on how they could be blocking my Curl request?
 
Whats the URL to the image? Have you tried using file_get_contents() ?
 
Set CURLOPT_VERBOSE to 1 and then post the output here so we can see what's going on.
 
Might want to check if the server in question is blocking it because you aren't passing their site as the referrer in the HTTP request header (maybe they try to prevent hotlinking of their images or something).
 
Back
Top