CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
counting hits

 



perlkid
stranger

May 7, 2000, 5:29 PM

Post #1 of 5 (753 views)
counting hits Can't Post

 
I need to setup a small routing system for my scripts and I need to know how to determine how many hits a url, cgi script, or page is reciving so I can do the redirection.

Thanks

perlkid


Neo_Matrix
Deleted

May 7, 2000, 6:11 PM

Post #2 of 5 (753 views)
Re: counting hits [In reply to] Can't Post

No code posted but going to give you the idea. What you need to do is set up a .txt file on the server. Have this txt or dat file store just a number. Everytime the page is run add 1 to the value. Then have your routine grab the file and read the variable and then from there do what you want depending on the number. Let me know what you come up with. Later.


turkscripts
Deleted

May 7, 2000, 7:01 PM

Post #3 of 5 (753 views)
Re: counting hits [In reply to] Can't Post

Another idea:
Everytime somebody visits your page, just append a period "." to the text file.
No need to read, increment, recreate the file and write back.
To find out how many visitors you had, just read the file to a string, and use length() function..


perlkid
stranger

May 8, 2000, 12:40 AM

Post #4 of 5 (753 views)
Re: counting hits [In reply to] Can't Post

 
Thanks Guys,

I'm going to use the one with the nubers. Thanks for the idea anyway turkscripts, Thanks a lot guys.

perlkid ... appreciate the replies

Now someone just needs to get Morphious as a username.


Cure
User

May 13, 2000, 12:48 PM

Post #5 of 5 (753 views)
Re: counting hits [In reply to] Can't Post

Hi
perlkid

To determine how many hits a url just use a SSI tag on the site to increment a file..


Cure

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives