I am fairly new to PHP, but I can do some stuff. Anyways, I was wondering how a counter for a web site would work? I know a basic idea on how I can set it up, but is there a function in PHP, which detects if a user has accessed your site? If not what is the alternative, so that my site/script knows that someone is present?
Also, is there a function that will allow me, to gain the IP numbers of people visiting my site? NO i will not be using this for hacking, but to track people who try to get into a ftp site of a group of friends and I. ( We editted video games, and we are making a modifucation, and we dont want it release pre mature)
When someone visits a page on your site, you just want to have a simple update query, where it updates a mysql table by one everytime that page is accessed. If you want to log their IP address then that is somewhat different and depends on the setup of the server whereby you are hosted, as on some $REMOTE_ADDR will work, and on others it will just give you the local, ie 127.0.0.1
Some tutorials I found helpful were over at phpbuilder.com
Bookmarks