Hi, hope you guys can help me here.
Here is my code
if (@exif_imagetype("http://$ImageURL/$LINK_ID".".gif")==IMAGETYPE_GIF) {$theExt = ".gif";}//finds the ext in this order: gif,jpg,png
if ($theExt=="" && @exif_imagetype("http://$ImageURL/$LINK_ID".".jpg")==IMAGETYPE_JPEG) {$theExt = ".jpg";}
if ($theExt=="" && @exif_imagetype("http://$ImageURL/$LINK_ID".".png")==IMAGETYPE_PNG) {$theExt = ".png";}
The purpose of this code is to check the image type. I have two domains. lets say "domain1" and "domain2"
This code resides in domain1 and I am trying to get the image type of the image located in domain2. I know the image exists and it works when I just do "http://domain2.com/image1.jpg"
BUT
when I use @exif_imagetype("http://domain2.com/image1.jpg") it does not find the image nor does it return any image type. I checked the access log of domain2 to see if anything from domain1 tried to access the "image1.jpg", and it does not show any activity.
Please note the above code does work for domain2.
I am wondering if this problem is due to some settings in my system. Do I need to do anything in php.ini or apache config or even firewall to allow exif_imagetype access domain2 images from domain1. Or is there any error in the code that I am not aware of.
Thanks
DPR