Re: IP security check

From: Date: Wed, 08 Aug 2001 07:14:21 +0000
Subject: Re: IP security check
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61761@lists.php.net to get a copy of this message
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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#61761) next »