venkat6134 — 2010-12-07T05:11:56-05:00 — #1
I want to display to the users, from which IPaddress and what time the user login and last visit time...
I know how to get IPaddress, but how to get the time at the user been login?
and also, when a guest clicks on the link, i want to increment the count to + 1.
If the same guest(means from same IP address) clicks more than once, i want to check the time interval between two clicks say 10 min, and then i want to increment..
For that purpose, i want to know the IP address as well as current time.
Can any one help me regarding this?
mrwooster — 2010-12-07T05:16:02-05:00 — #2
To get the time you can use php's time functions
I suggest that you store the time in a cookie http://php.net/manual/en/function.setcookie.php . When a user comes to your site, check if a cookie exists, if it does, compare the time stored in the cookie to the current time.
raju_gautam — 2010-12-07T05:19:18-05:00 — #3
This will give you the IP address and even the LAN IP too.
And for handling the date time see the date() function.
And to store the date/time, as suggested earlier, use setcookie function.