I've done the following for a page that needs to be loaded every few minutes. It's working for what I want to do but it's not very secure if I'm not mistaken. (Would be easy to spoof my ip address?)
if ($_SERVER["REMOTE_ADDR"] != 'my_ip' AND $_SERVER["REMOTE_ADDR"] != $_SERVER["SERVER_ADDR"]) {
die();
}
What's a better way to do this?