Hi, Y'all,
Here's another suggestion FWIW.  I prep a few
variables in the htmlhead.php routine, $RemoteHost
being one of them.  Having some simple names for
associated values is kinda handy.  One of the biggest
strengths of PHP is that there's more than one way to
go about solving problems.  Here goes:

<?php
/* Identify the request, request headers, and the
requestor */
$HTTP_Headers = getallheaders();
$Method = getenv( "REQUEST_METHOD" );
$Referer = getenv( "HTTP_REFERER" );
$RemoteHost = getenv( "REMOTE_HOST" );

if ( $HTTP_X_FORWARDED_FOR ) {
        $RemoteAddr = $HTTP_X_FORWARDED_FOR;
} elseif ( $HTTP_VIA) {
   $RemoteAddr = $HTTP_VIA;
} elseif ( $REMOTE_ADDR ) {
   $RemoteAddr = $REMOTE_ADDR;
}

?>


--- Jesse Cablek <[EMAIL PROTECTED]> wrote:
> Anil Garg <mailto:[EMAIL PROTECTED]> scribbled;
> > 
> > Can i get the ip-address of the machines who
> accessed my website??
> > Plz give the pointer that on what lines shall i
> start for doing so.
> > 
> 
> print $_SERVER['REMOTE_ADDR'];
> 
> -jesse
> 
> 
> -- 
> 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