Page 1 of 1
getting Users ips
Posted: Sat Jan 29, 2005 9:12 pm
by Smackie
Alright i need some help with getting a script that will help me get users
IP adresses and getting codes so i can have
like ways to ban people i want a Ip ban, a 6 hour ban and a perm ban
and other kind of ban's please help if you can....
Smackie
~To those who disrespect the one they call Smackie you will be bannished from the face of the earth at midnight on the birth of your first child~
Posted: Sat Jan 29, 2005 9:24 pm
by hunterhp
To get users ip, $_SERVER['REMOTE_ADDR']
Posted: Sat Jan 29, 2005 9:27 pm
by shiznatix
smackie is the gayest name i have ever heard
$HTTP_SERVER_VARS["REMOTE_ADDR"]
get the ip's of the ppl who are visiting ur site, one good way to ban ppl is to make a txt file, chmod it to 777. 1st check the file to see if their ip is located in the ban list. if it does redirect em to a page that laughs at them, if it isnt continue to the site
the txt file could be like this
1.123.543.2, 123.564.78.32,
and u could use explode() to seperate the ips and individually match them up to the ip of the person visiting ur site
do it
Posted: Sat Jan 29, 2005 10:46 pm
by feyd
databases are a better storage media for ban lists.
Posted: Sun Jan 30, 2005 8:13 am
by Smackie
When i put this
it only gives me my ip address i need to get other peoples ip address same with
Code: Select all
$HTTP_SERVER_VARSї"REMOTE_ADDR"]
Posted: Sun Jan 30, 2005 9:02 am
by John Cartwright
It is because you are using an older version of PHP, I believe.
Posted: Sun Jan 30, 2005 10:54 am
by feyd
the IP returned is the current user's IP. There is no built-in list of ip's currently accessing the site, you have to build it. This is why I said that databases are best for this.