PDA

View Full Version : Page views script



Seduced
27-01-2007, 03:24 PM
Okay i'm making a site where i have thousands of clips for ppl to view, and i want each page where they watch to have a script on, showing you how many times the page had been viewed.

where can i get this script?

I know i'll have to add the script to each clip page lol.

Edited by Lµke (Forum Moderator): Thread Moved from Website Designing. Please post in the correct section next time, Thanks :).

Seduced
27-01-2007, 03:28 PM
sorry for the bump.

Seduced
27-01-2007, 04:02 PM
yaps!

Ingnore = Bumps:(

Edited by Mattps22004 (Forum Moderator): Please do not triple post.

Lycan
27-01-2007, 04:06 PM
someone doesn't reply within an hour so you bump ... twice

geese just wait

Call
27-01-2007, 04:15 PM
www.statcounter.com
Make some counters..

Seduced
27-01-2007, 10:58 PM
www.statcounter.com (http://www.statcounter.com)
Make some counters..

Thanks i want it in text though not shown on a button, and when i select that it still comes out on a button:(

Robbie
27-01-2007, 11:02 PM
make a file called hitcounter.txt and CHMOD it to 0777

Then this is your counter code. Put it on your page directly or on a page called counter.php or something


<?php
$countpg = ("hitcounter.txt");
$hits = file($countpg);
$hits[0] ++;
$fp = fopen($countpg , "w");
fputs($fp , "$hits[0]");
fclose($fp);
echo $hits[0];
?>

beer
27-01-2007, 11:04 PM
http://www.phpjunkyard.com/php-text-hit-counter.php

:]. Enjoy!

Robbie
27-01-2007, 11:06 PM
I beat you hehe :p

Mentor
28-01-2007, 11:02 AM
More info on your site would allow for a better counter solution, for exsample if all your clips were accessed by a page say, clip.php then an id, so clip.php?show=30

You could easly make a few simple changes to a basic txt counter script, like the one posted above, so it would keep track and count, views for each page id inderviualy, and you only have to add it once.

Want to hide these adverts? Register an account for free!