Code:
http://url.com/image.jpg?blablabla
The server SHOULD respond to your request with a mime-type/content-type header.
PHP Code:
<?php
$ch = curl_init("http://url.com/image.jpg?blablabla");
curl_exec($ch);
$info = curl_getinfo($ch);
echo $info["CURLINFO_CONTENT_TYPE"];
curl_close($ch); // always close handle
?>
Extensions are not really important, from what I understand they only serve two purposes:
1) to help end-users identify types of files without having to open them
2) for operating systems to add some type of image/logo and default program associated with an extension.
They carry absolutely zero weight as far as the file's actual contents go. The only reason your .php files are executed using PHP is because there is an apache directive more or less like this:
Code:
<FilesMatch "\.php$">
AddHandler x-httpd-php5.3 .php
</FilesMatch>
You can rename all of your php files jpg and add this directive:
Code:
<FilesMatch "\.jpg$">
AddHandler x-httpd-php5.3 .jpg
</FilesMatch>

Cheers
Bookmarks