Reply
Unique Hits Counter
Old 07-21-2004, 11:52 AM Unique Hits Counter
Unknown.

Posts: 1,693
What I want is a counter that record the number of unique hits and uses PHP and MySQL...

Anyone be able to help ??

Thanks

-James
Dark-Skys99 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 07-21-2004, 01:23 PM hi
Mooofasa's Avatar
Defies a Status

Posts: 1,612
Name: Michael (mik) Land
Location: England
I think i might be able to help, just hang on...
Sorry cant help you, i cant figure it out, still using your ebook, its ace lol.


Mik
__________________
Tumblings.co.uk - Tumblog with thoughts, quotes, links, videos, images and my creations.
Opera Browser - The best free web browser.
Opera Dev Tools - Firefox is now Firefail.

Last edited by Mooofasa : 07-21-2004 at 01:27 PM.
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 07-21-2004, 07:33 PM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
http://www.hotscripts.com/PHP/Script...ers/index.html

But they are easy enough to make. Simple counter:
database has id page and count fields

then add this PHP code to each page you want counted:
PHP Code:
<?
$page
=$_SERVER['REQUEST_URI'];
$exists="SELECT id, count FROM counters WHERE page='".$page."'";
$result=mysql_query($exists);
$num=mysql_num_rows($result);
if(
$num==0)
{
$query="INSERT INTO counters VALUES ('','".$page."','0')";
}
else
{
$id=mysql_result($result0"id");
$count=mysql_result($result0"count");
$count++;
$query="UPDATE counters SET count='".$count."' WHERE id='".$id."'";
}
mysql_query($query);
?>
Thats a very basic script. You can do a lot more with some work. There's a great article on http://www.phpbuilder.com/columns/ti...1.php3?aid=166
__________________
Free Webmaster Help - Everything a webmaster needs - for free
Free-Webhosting.info - Free web hosts reviewed and rated
Web Hosting Hunt - Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile Visit david's homepage!
 
Reply     « Reply to Unique Hits Counter
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12275 seconds with 12 queries