Page 1 of 1

how can I know user IP ?? plzz

Posted: Sat May 29, 2004 9:33 pm
by normal
how can I know user IP ?? plzz

Posted: Sat May 29, 2004 9:38 pm
by feyd
usually it's stored in the $_SERVER variable..

Code: Select all

$_SERVER['REMOTE_ADDR']

Posted: Sun May 30, 2004 9:29 am
by McGruff
What do you plan to do with it?

Posted: Sun May 30, 2004 12:54 pm
by mudkicker
or use

getenv() function with REMOE_ADDR...

Posted: Sun May 30, 2004 1:04 pm
by Joe
$_SERVER['REMOTE_ADDR'];

Posted: Sun May 30, 2004 1:26 pm
by normal
I wanna count online users !

Posted: Sun May 30, 2004 1:27 pm
by Joe
Are you asking how to count online users, or are you just telling?

Posted: Sun May 30, 2004 2:17 pm
by dull1554
and im intregued to know how your gonna do this with the users ip address

Posted: Sun May 30, 2004 2:22 pm
by mabufo
obviously he is going to cast a magical spell on the $_Server variable!

DUH!

Posted: Sun May 30, 2004 8:28 pm
by tim
you know

if I had a cookie for everytime someone asked how to get the IP of their users




i would have alot of cookies

:twisted:

!! use the search function!!

Posted: Sun May 30, 2004 11:33 pm
by d3ad1ysp0rk
tim wrote:you know

if I had a cookie for everytime someone asked how to get the IP of their users




i would have alot of cookies

:twisted:

!! use the search function!!

Code: Select all

setcookie("tasty_cookie","yummy","when_you_eat_it","/","tim");

Posted: Mon May 31, 2004 8:21 am
by dull1554
a magical spell.......

Posted: Mon May 31, 2004 2:48 pm
by John Cartwright

Code: Select all

<?php
setcookie("tasty_cookie","yummy","when_you_eat_it","/","tim");

if (isset($_COOKIE["tasty_cookie"]))
     {
     eatcookie("tasty_cookie","yummy","when_you_eat_it","/","phenom");
     }

?>