Re: Can PHP be used to snatch images cross-domain?
| From: | Chris | Date: | Wed, 17 Dec 2008 03:09:46 +0000 |
| Subject: | Re: Can PHP be used to snatch images cross-domain? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-284717@lists.php.net to get a copy of this message | ||
Rob Gould wrote:
Brilliant! Now why do all these other scripts I've found make it look so hard?? http://wiki.dreamhost.com/index.php/CURLcurl can handle timeouts much better (file_get_contents will timeout when the server on the other end says so). it can also tell you if a 404 is returned, and handle basic authentication. file_get_contents is very simple. if i replace foo.png with a 404 page, that's what you'll get - and that's what you'll save as your image. -- Postgresql & php tutorials http://www.designmagick.com/