Jump to content


Photo

Need php/mysql advice, store lots of ip numbers


  • Please log in to reply
2 replies to this topic

#1 Trevors

Trevors
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 21 October 2006 - 11:03 AM

Hi all,

Im runnin a blog toplist and im using evotopsite but im about to trash it cuz it pretty much blows.
So there for im writing my own but im looking for some advice how to code the tracker that tracks
unique visitors on the blogs.

This tracker (a image) stores all ip numbers in a mysql table and for each unique visitor the blog ranks higher.
So the blogs are ranked depending on the unique visitors.

So whats the best way and most optimized, i was thinking of having a a bit of code which runs once every 15 minutes and counts the unique visitors to the blog toplist which ranks em.
When it runs it flags those ip numbers that have already been counted, the ip column will be set to unique so it only stores same ip once only.

Does this sound like a good idea?


Best Regards


#2 gerkintrigg

gerkintrigg
  • Members
  • PipPipPip
  • Magician
  • 828 posts
  • LocationBristol, UK
  • Age:37

Posted 21 October 2006 - 01:00 PM

Not really sure what you want us to say...
Yes, it sounds like a good idea...
Neil Trigger - http://www.ghostlypublishing.co.uk - Ghostly Publishing - Children's Fantasy Books

#3 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 21 October 2006 - 01:31 PM

the only other option i'd throw out is that if it's not an extraordinary amount of sites, you could actually "rate" them when the page loads. if you're talking about hundreds of thousands of records you're having to have SQL count up, then your idea is definitely the better option.
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users