Jump to content

[SOLVED] Advice on whos visited your profile


graham23s

Recommended Posts

Hi Guys,

 

I was wondering if any of you guys could advise me on the best way to do this:

 

i was wanting users on my site to see the last 5 or 10 users that had visited there profile, what would be the best way to do this, (i'm not asking for code unless you have it lol) just the "do this, do that" kinda thing.

 

thanks guys

 

Graham

personally... i wouldnt make a new table for just that... i'd probably set it right into the table which controls those webpages :-)... once you have the id list...

$list=explode('|',$row[lastusers]);
foreach($list as $v){
$query=mysql_query("SELECT `name` FROM `users` WHERE `id`='$v' LIMIT 1");
$row=mysql_fetch_array($query);
$lastusers[]=$row[name];
}

 

you could instead store the name into the table... however i like stuff being automatic(if they changed names, etc)... thats just me tho :-)

If I was going to do this I would just record all the request data for each http_request along with the users information, the profile page for each user will have a unique url, something like ?profile=name so you can just search through the logs and pay attention to the user_ids in the result.

 

 

 

 

 

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.