Re: [PHP] How to get the IP of a visitor
On Mon, 18 Mar 2002, Ulrik Witschass wrote: > Hi, I am new to this list and to PHP, so please excuse any newbie questions > :) > > Want I need to know is how to get either the ISP or the IP of the visitor of > a page. I guess this is a environment variable, but I don't know which. > Any help is greatly appreciated :) It's $REMOTE_ADDR. The quickest way to see which variables are available is to stick the function phpinfo() into your page. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to get the IP of a visitor
$HTTP_SERVER_VARS['REMOTE_ADDR'] getenv("REMOTE_ADDR") $REMOTE_ADDR ... there are others too On the same topic, what do you folks think is the best way? meaning most cross-platform functional, fastest (if at all important for this), anything else that could help make a decision. Sean -Original Message- From: Drew Lopucki [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 12:08 PM To: Ulrik Witschass; [EMAIL PROTECTED] Subject: RE: [PHP] How to get the IP of a visitor use . you'll see all the variable in the http request header. -Original Message- From: Ulrik Witschass [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 11:57 AM To: [EMAIL PROTECTED] Subject: [PHP] How to get the IP of a visitor Hi, I am new to this list and to PHP, so please excuse any newbie questions :) Want I need to know is how to get either the ISP or the IP of the visitor of a page. I guess this is a environment variable, but I don't know which. Any help is greatly appreciated :) Thanx! Ulrik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to get the IP of a visitor
use . you'll see all the variable in the http request header. -Original Message- From: Ulrik Witschass [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 11:57 AM To: [EMAIL PROTECTED] Subject: [PHP] How to get the IP of a visitor Hi, I am new to this list and to PHP, so please excuse any newbie questions :) Want I need to know is how to get either the ISP or the IP of the visitor of a page. I guess this is a environment variable, but I don't know which. Any help is greatly appreciated :) Thanx! Ulrik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to get the IP of a visitor
Good day, You'll need to check the documentation of your web server for that (or post on the appropriate list). You can use the phpinfo() function to see all of the environment values that PHP sees. Off the top of my head, I think Apache stores it in REMOTE_IP . Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: Ulrik Witschass [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 9:57 AM To: [EMAIL PROTECTED] Subject: [PHP] How to get the IP of a visitor Hi, I am new to this list and to PHP, so please excuse any newbie questions :) Want I need to know is how to get either the ISP or the IP of the visitor of a page. I guess this is a environment variable, but I don't know which. Any help is greatly appreciated :) Thanx! Ulrik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to get the IP of a visitor
Hi, I am new to this list and to PHP, so please excuse any newbie questions :) Want I need to know is how to get either the ISP or the IP of the visitor of a page. I guess this is a environment variable, but I don't know which. Any help is greatly appreciated :) Thanx! Ulrik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php