PDA

Click to See Complete Forum and Search --> : ip address of visiting user


Icheb
Mar 30th, 2002, 09:49 AM
Hi,

I need to make something that displays the user ip address as a result (to be included into a site) and if possible writes the ip and hostname to a file or database.

I have totally no experience with it, so if you want to help me, please treat me as a newbie with PHP...

And no, i'm not gonna use ASP because i want an apache server instead of micro$oft stuff :rolleyes:

thanks in advance

scoutt
Mar 30th, 2002, 11:43 AM
$ip = $REMOTE_ADDR;
$host = $REMOTE_HOST;

and I suggest reading the php manual if you don't know how to connect to the database.

Icheb
Mar 31st, 2002, 03:50 AM
tnx...

I will read it (or at least the things i need to know)

ubunreal69
Mar 31st, 2002, 06:09 AM
hmmmm, i like this "Icheb" guy, refuses to use ASP, likes PHP, he has more sense than any other person on this forum !!!! :) i like

Icheb
Mar 31st, 2002, 08:20 AM
Originally posted by ubunreal69
hmmmm, i like this "Icheb" guy, refuses to use ASP, likes PHP, he has more sense than any other person on this forum !!!! :) i like

LOL !!

thanx...

NewHelp4Me
Apr 1st, 2002, 04:15 PM
I don't have one of thoes. Got any tutorials? PHP.com doesnt explain much. I too would like to write IP adresses to a (text) file.

scoutt
Apr 1st, 2002, 04:23 PM
http://www.php.net/manual/en/

and then you can get the manual as it is free.