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]>
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 php that can
> assign that to a
> variable, as in:
> 
> $ip=HTTP_GET_????
> 
> ANY IDEAS????
> 
> Thanks
> 
> 
> Elliot J. Balanza
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=====
Bill Farrell
Multivalue and *nix Support Specialist

Phone: (828) 667-2245
Fax:   (928) 563-5189
Web:   http://www.jwfarrell.com

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to