PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
normal
Forum Newbie
Posts: 5 Joined: Sun May 16, 2004 8:07 am
Post
by normal » Sat May 29, 2004 9:33 pm
how can I know user IP ?? plzz
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sat May 29, 2004 9:38 pm
usually it's stored in the $_SERVER variable..
McGruff
DevNet Master
Posts: 2893 Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland
Post
by McGruff » Sun May 30, 2004 9:29 am
What do you plan to do with it?
mudkicker
Forum Contributor
Posts: 479 Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:
Post
by mudkicker » Sun May 30, 2004 12:54 pm
or use
getenv() function with REMOE_ADDR...
Joe
Forum Regular
Posts: 939 Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow
Post
by Joe » Sun May 30, 2004 1:04 pm
$_SERVER['REMOTE_ADDR'];
normal
Forum Newbie
Posts: 5 Joined: Sun May 16, 2004 8:07 am
Post
by normal » Sun May 30, 2004 1:26 pm
I wanna count online users !
Joe
Forum Regular
Posts: 939 Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow
Post
by Joe » Sun May 30, 2004 1:27 pm
Are you asking how to count online users, or are you just telling?
dull1554
Forum Regular
Posts: 680 Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W
Post
by dull1554 » Sun May 30, 2004 2:17 pm
and im intregued to know how your gonna do this with the users ip address
mabufo
Forum Commoner
Posts: 81 Joined: Thu Jul 10, 2003 11:11 pm
Location: Orland Park, IL
Contact:
Post
by mabufo » Sun May 30, 2004 2:22 pm
obviously he is going to cast a magical spell on the $_Server variable!
DUH!
tim
DevNet Resident
Posts: 1165 Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio
Post
by tim » Sun May 30, 2004 8:28 pm
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
!! use the search function!!
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Sun May 30, 2004 11:33 pm
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
!! use the search function!!
Code: Select all
setcookie("tasty_cookie","yummy","when_you_eat_it","/","tim");
dull1554
Forum Regular
Posts: 680 Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W
Post
by dull1554 » Mon May 31, 2004 8:21 am
a magical spell.......
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Mon May 31, 2004 2:48 pm
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");
}
?>