Hello, I have a website that uses google images to show images on my site. SOmetimes images dont show up if they are hotlink protected. How can I test this using php? I tried if file exist and that doesnt work because the file exist, you just can view it on your webpage. I also try using php image size to test the size but that did not work... any ideas?
it's a little bit tricky since the server will return various type of image to protect hotlinking. Perhaps you should grab the image using cURL, the server won't recognize it as a hotlinking. but it's a little bit difficult and will take more resources.
the holinking is protected obvious. 1. give up the image 2. grab the image using curl ( forge the http referer header as ie, firefox)