Student in Extreme Need
Moderator: General Moderators
Student in Extreme Need
Im trying to use PHP to log a users IP address and timestamp, then when that visitor returns to the webpage, i dont want the counter to count up, i can get a the page to display the ip address and time stamp, i need to put this in a text file so everytime someone views the webpage, it will look up a list of previous IP Addresses and if that IP address is there, the counter will remaint he same.. Please, any help would be greatly appreciated!!!!!
Try looking at the following for pointers:
http://www.php.net/manual/en/function.fwrite.php
http://www.php.net/manual/en/function.file.php
http://www.php.net/manual/en/function.in-array.php
http://www.php.net/manual/en/function.fwrite.php
http://www.php.net/manual/en/function.file.php
http://www.php.net/manual/en/function.in-array.php
Last edited by mchaggis on Sat Nov 29, 2003 9:36 am, edited 1 time in total.
I would start off with a good [google]php counter tutorial[/google], and then expand the script to include IP monitoring by getting a good [google]IP log tutorial in php[/google].
If you want to cheat a bit there is prebuilt scripts for almost everything at http://www.hotscripts.com/PHP
When I was learning I didn't just copy the source and use it, rather study what they used to achieve the result and then try to emulate it on my own.
If you want to cheat a bit there is prebuilt scripts for almost everything at http://www.hotscripts.com/PHP
When I was learning I didn't just copy the source and use it, rather study what they used to achieve the result and then try to emulate it on my own.