Try this code:
if(getenv("HTTP_X_FORWARDED_FOR"))
{
$ip=getenv("HTTP_X_FORWARDED_FOR");
}
else
{
$ip=getenv("REMOTE_ADDR");
}
$host = gethostbyaddr($ip);
And check out http://www.php.net/manual/en/function.getenv.php
However, I think it is very unsafe to base your payment transactions on these
features. If a criminal can get credit card data, he can sure get IP
addresses also.
Regards
René
matt wrote:
> For secure payment pages, I need for the code to determine the persons IP
> address, even if they have a "spoofer" running. Is this possible? Getting
> around the spoofer in order to catch criminals using illegal credit card
> #'s..
>
> thanks
> -matt (cs student)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]