Topic awaiting preservation: php, getimagesize(http//...) with allow_url_fopen OFF (Page 1 of 1) |
|
---|---|
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 01-05-2006 18:30
hi, i was wondering if there is a possibility to do a php->getimagesize of an image on another machine, but with the allow_url_fopen set to OFF. (Dreamhost configuration) |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 01-05-2006 18:53
ok, i just found a solution myself: code: $ch = curl_init("http://www.someadress/img.gif"); $filename="/somewriteablepath/test/yxc"; $fp = fopen($filename, "w"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); print_r(getimagesize($filename)); |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 01-05-2006 22:03
now... what happens if that script runs multiple times at the same time? |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 01-05-2006 22:09 |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 01-06-2006 00:26
yeah if you get separate requests. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 01-06-2006 09:30
No! |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 01-06-2006 11:10
how do i get the file path of the php->tmpfile ? cause php->getimagesize only takes file paths and not file handles. |