PDA

View Full Version : HTML code fragment







Abe
17-07-2001, 12:40 AM
I am looking for an HTML code fragment to clock the number of visitors to my site. I require a simple code, with no frilly statistics on routings etc.
Can any members in the know help?
The ones available on the net all create links to the originator

Abe
17-07-2001, 11:20 PM
Hello Mark,

Im on a Unix server, I have not seen a cgi-bin directory listed in any server sub directory, but expect that since the page is hosted on a Ntl server, cgi-bin is available and accessable.
I am unsure about the ability to upload scripts.

I obtained a html code fragment off the web and used it on my page, the counter worked fine. I just didnt like the idea of the person who created the fragment bombarding me with daily e mails with all sorts of offers, etc
I had to register and pass over my e mail address to obtain the fragment.

Theres no free lunch I guess, theres always a catch or a string attached. It would be nice to know the number of visitors to my site though,
Thanks for the help Mark

Abe
20-07-2001, 12:15 AM
Hello Marc, Ive sent you the access details to your email address

nh3simman
21-03-2007, 09:21 PM
... number of visitors to my site...

If your server supports PHP, its a 1 liner.

nh3simman
22-03-2007, 04:13 AM
If your server supports PHP, its a 1 liner.

in php, the super global variable
$_SERVER['REMOTE_ADDR']
gives the address of the on-line user

where
REMOTE_ADDR = The IP address from which the user is viewing the current page.

nh3simman
22-03-2007, 05:07 PM
Here is a good article that deals with efficiency issues of counting online users.

http://www.devarticles.com/c/a/PHP/The-Quickest-Way-To-Count-Users-Online-With-PHP/