I need to add an if statement on top of my php script in order to check the ip of the script invoker:
if (invoker_ip = "123.123.123.123") {
.. code here ..
}
the script is just a script.php file on my server
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use :
Nevertheless this value will not be relevant if user is behind a proxy.
The real ip probably can be found in HTTP header like HTTP_CLIENT_IP or HTTP_X_FORWARDED_FOR but can’t be trusted. (header are easy to modify)