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?

Link to comment
Share on other sites

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).

 

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.