RE: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Webmaster MBTRADINGCO
what is the current IP address for it's server. Thanks to all it worked. -Mensaje original- De: Jon Haworth [mailto:[EMAIL PROTECTED]] Enviado el: MiƩrcoles, 02 de Octubre de 2002 10:19 a.m. Para: [EMAIL PROTECTED] Asunto: RE: [PHP] Getting users IP address into a variable. Hi, &g

Re: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Chris Hewitt
Webmaster MBTRADINGCO wrote: >I'm sure there has to be a way to verify which IP address is accessing > Don't count on it to identify users on the internet though. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Bill Farrell
Try: $ip = ""; if ( $HTTP_X_FORWARDED_FOR ) { $ip = $HTTP_X_FORWARDED_FOR; } elseif( $HTTP_VIA ) { $ip = $HTTP_VIA; } elseif( $REMOTE_ADDR ) { $ip = $REMOTE_ADDR; } else { die(); // or perhaps some better response } --- Webmaster MBTRADINGCO <[EMAIL PROTECTED]> wro

RE: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Jon Haworth
Hi, > > I'm sure there has to be a way to verify which IP > > address is accessing from. > > $ip=HTP_GET_ > > $REMOTE_ADDR ...and to deal with some (but not all) proxies: $ip = (getenv("HTTP_X_FORWARDED_FOR")) ? getenv("HTTP_X_FORWARDED_FOR") : getenv("REMOTE_ADDR"); Either wa

RE: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Merritt, Dave
Try: $ip=$_SERVER['REMOTE_ADDR'] -Original Message- From: Webmaster MBTRADINGCO [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 1:08 PM To: [EMAIL PROTECTED] Subject: [PHP] Getting users IP address into a variable. I'm sure there has to be a way to verify which IP address i

Re: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Rasmus Lerdorf
$REMOTE_ADDR On Wed, 2 Oct 2002, Webmaster MBTRADINGCO wrote: > I'm sure there has to be a way to verify which IP address is accessing > from. I need to establish a page where when I enter it records the IP > address I'm logging in from, to a database. > > Problem is I can't seem a command in ph