php ip

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
Xavier
-


Joined: 17 Jan 2004
Posts: 50

PostPosted: Sun Jan 25, 2004 6:45 pm    Post subject: php ip Reply with quote

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 View user's profile Send private message
jtc970
-


Joined: 24 Mar 2003
Posts: 172

PostPosted: Sun Jan 25, 2004 8:25 pm    Post subject: Reply with quote

<?
$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 View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group