how can I reliably check that requests to my service file have come from my website?
- by woot586
I have a service.php class that I use to service AJAX calls from my website. To prevent other people accessing the service using PHP CURL I would normally check the request has come from mysite, and if they are not then just redirect to my home page e.g.
if($_SERVER['HTTP_REFERER'] != "http://www.mysite.com"){
header('location:…