News: Cexx forums, with volunteers dedicated to helping you remove malware and stay protected
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
June 19, 2013, 12:57:17
Pages: [1]   Go Down
  Print  
Topic: number of hits  (Read 2992 times)
0 Members and 1 Guest are viewing this topic.
« on: December 11, 2003, 13:25:14 »
Anonymous
Guest

how can I publish the numbers of hits that the people are visited in a link.
I mean like the numbers of downloads of a file but I need it in a page not a file.

thanks
Logged
« Reply #1 on: December 11, 2003, 13:52:50 »
Anonymous
Guest

and also that if he press ones he cant press it again of the count will not count the second time.

thanks
Logged
« Reply #2 on: December 11, 2003, 18:13:05 »
Dunc Offline
Jr. Member

**

Karma: 0
Posts: 82



Grrrrr! im verrrrry drunk @ the mo...but you need to knoe php for that one mate....drink.. bad karma for the soul ololol
Logged
« Reply #3 on: December 15, 2003, 01:44:15 »
doryshe
Guest

do anyone know how to do it?
pls...

thanks
Logged
« Reply #4 on: December 16, 2003, 09:18:57 »
Dunc Offline
Jr. Member

**

Karma: 0
Posts: 82



Sorry about the dalay and the previous reply wasnt helpful either I was drunk @ the time  Embarassed I dont have much time at the mo due to work and private life, so I cant write the script for you. I dont have the time to write scripts for my own site at the mo. The best thing to do is buy a basic book on php/mysql. The crux of what you will have to do  is to have a database table to store the links in. Instead of linking directly to a file, you will link to a 'redirect' page using a value after the page name. eg redirect.php?value=1 this will take you to a page called redirect.php and the bit after the ? eg value=1 will be separated as a global variable. the script would then look up the value of 1 in a database and get the link, increase a count value by 1, then redirect to the link in question.
If you wanted a visitor count as opposed to a hit count then you would have to use cookies to tell the script that this visitor has alredy been to the site and not to increase the hit count.
I find the best way to get to grips with scripting is to sit down with a book about it and try stuff out.
[/b]
Logged
« Reply #5 on: December 16, 2003, 20:55:29 »
harby Offline
Newbie

*

Karma: 0
Posts: 1



Quote from: Dunc
Sorry about the dalay and the previous reply wasnt helpful either I was drunk @ the time  Embarassed I dont have much time at the mo due to work and private life, so I cant write the script for you. I dont have the time to write scripts for my own site at the mo. The best thing to do is buy a basic book on php/mysql. The crux of what you will have to do  is to have a database table to store the links in. Instead of linking directly to a file, you will link to a 'redirect' page using a value after the page name. eg redirect.php?value=1 this will take you to a page called redirect.php and the bit after the ? eg value=1 will be separated as a global variable. the script would then look up the value of 1 in a database and get the link, increase a count value by 1, then redirect to the link in question.
If you wanted a visitor count as opposed to a hit count then you would have to use cookies to tell the script that this visitor has alredy been to the site and not to increase the hit count.
I find the best way to get to grips with scripting is to sit down with a book about it and try stuff out.
[/b]


a great answer! thank-you for sharing that. you should stay sober more often lol Wink
Logged
« Reply #6 on: December 19, 2003, 12:10:51 »
Dunc Offline
Jr. Member

**

Karma: 0
Posts: 82



Thanks for that Harby. I've found on a few occasions that drink and computers dont mix Wink  *writes 100 times: I must not use compters whilst drunk* Very Happy
On a serious note, Ive noticed that more and more FWP's are providing PHP, so if your interested in learning, you really need to setup a webserver on your PC in order to use the php executable. I use http://www.xitami.com/but if I was to do it now, I would probably use http://www.apache.org/ as you can use the .htaccess file on that. You can then set up http://www.php.net/ and http://www.mysql.com/ and your set to go. You CAN learn php without a webserver, but this means uploading to your webspace everytime you want to test a script out.
Logged
 
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Page created in 0.48 seconds with 20 queries.