mime_content_type remote file

Hello

I am using following to determine the mime_type of a remote file

$filename = str_replace("%20", " ",$_GET["image"]);
echo "Filetype: ". mime_content_type($filename) .
"\n\n\n\n\n\n\n<bR><br><br>";

When I view the link in browser, it's show ok. When i run the script, I get
following message:

Warning: mime_content_type(REMOTEURL/AMD AM2 X2.JPG)
[function.mime-content-type]: failed to open stream: HTTP request failed!
HTTP/1.1 404 Not Found

The remote file is on a Unix server, I know it's case sensitive.

Best Regards
Joris Willekens


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Joris Willekens [ Mi, 04 Juni 2008 14:14 ] [ ID #1955022 ]
PHP » gmane.comp.php.windows » mime_content_type remote file

Vorheriges Thema: Strange - fgets/fgetsv ... 8 is not a valid stream resource
Nächstes Thema: PHP 5.2.6 not giving or logging any errors