Jump to content

how to show the 5 latest vistors referer's site url on my site ?


runeveryday

Recommended Posts

My guess is you'll need to store them in a file or a database. I think referer only remembers one step back.

if i want to put every url into a  database table, with the time going , the table will become larger and larger.so, i want to let the database only save one day 's records。 when a new day comes, the old day's record will be deleted. is there a way to get this?

For sure...both php and mysql can get you the current date to compare against.

 

If you're worried about size (which you shouldn't be, thats what databases do best) then write the script to overwrite so there will be only 5 entries at any time. I would avoid wiping out a full days worth of url's because if someone comes to the site right after you wipe out the list, there will be no url's to show (except their own referer of course).

 

 

For sure...both php and mysql can get you the current date to compare against.

 

If you're worried about size (which you shouldn't be, thats what databases do best) then write the script to overwrite so there will be only 5 entries at any time. I would avoid wiping out a full days worth of url's because if someone comes to the site right after you wipe out the list, there will be no url's to show (except their own referer of course).

how to  write a script to overwrite so there will be only 5 entries at any time?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.