View previous topic :: View next topic |
Author |
Message |
Xavier -
Joined: 17 Jan 2004 Posts: 50
|
Posted: Sun Jan 25, 2004 6:45 pm Post subject: php ip |
|
|
How can i record the users ip adresses using php
i got and idea for using the Code: | <?php $_SERVER["REMOTE_ADDR"]; ?> | and some kind of form but i have no idea how
p.s. this might be a stupid question to a lot of u but im a newbie on php |
|
Back to top |
|
|
jtc970 -
Joined: 24 Mar 2003 Posts: 172
|
Posted: Sun Jan 25, 2004 8:25 pm Post subject: |
|
|
<?
$ip = $_SERVER["REMOTE_ADDR"];
#how do you want to record the ip?
#in a text file, something like this would work
$handle = fopen ("visitors_ip.txt","w");
fputs($handle,$ip);
?>
hope that helps |
|
Back to top |
|
|
|