I want to get the file type (eg. image/gif) by URL using PHP.I had tried
<?php$image_path="http://fc04.deviantart.net/fs71/f/2010/227/4/6/PNG_Test_by_Destron23.png";exif_imagetype($image_path);?>
The above code gave me a blank page and the following code returned "3":
<?php$image_path="http://fc04.deviantart.net/fs71/f/2010/227/4/6/PNG_Test_by_Destron23.png";echo exif_imagetype($image_path);?>
Where am I going wrong?Solved: using Fileinfo to fetch content type