I am trying to create a script that checks the file type of a remotely hosted script. This is what I have so far, but it does not work:
if (empty($photo_url) || empty($link) || empty($email)){echo "
Go back and
fill out the form
"; exit;}
$ext = strrchr($photo_url,'.'); // check for extension
if (!$ext = ".jpg") {echo "please link to a jpeg";}
$fp = @fopen($photo_url, "r");
if (!$fp) { echo "
The photo url is dead!
"; exit;}
else { fclose($fp); echo "
The photo url is working!
";}