PHP script executed only from a certain machine
Posted: Wed Nov 25, 2009 4:14 am
I have a PHP script on my index.php file and I want this script to be executed ONLY when I access index.php file from my computer (which is at home). I want this PHP script NOT to be executed when someone else access index.php file from another machine.
My problem is that I don`t know how to do this. I was thinking to use the IP addresse of my computer but, unfortunately, it is dinamyc. So, every time when I get on the Internet I have a completely different IP addresse. It would work only if the IP addresse would be static.
In this moment I have no idea and I wonder if someone can give a tip.
My problem is that I don`t know how to do this. I was thinking to use the IP addresse of my computer but, unfortunately, it is dinamyc. So, every time when I get on the Internet I have a completely different IP addresse. It would work only if the IP addresse would be static.
In this moment I have no idea and I wonder if someone can give a tip.