I have the below code processing my form:
[b]I want to log the real IP of the person sending the form data from my website.
Please help with the code needed for that.
Thank you![/b]
I have the below code processing my form:
[b]I want to log the real IP of the person sending the form data from my website.
Please help with the code needed for that.
Thank you![/b]
[php]$ipAddress = $_SERVER[‘REMOTE_ADDR’];
if (array_key_exists(‘HTTP_X_FORWARDED_FOR’, $_SERVER)) {
$ipAddress = array_pop(explode(’,’, $_SERVER[‘HTTP_X_FORWARDED_FOR’]));
}[/php]
Thank you very much for ur reply.
Can u plz make the full code for me as I receive the IP in the email I receive. Plz help! I’m amateur in PHP
You know, you don’t get better when others do your work for you.