Does anyone know how I can display a list of (let's say) 5 members that have visited my profile page recently? Shouldn't be too hard, should it?

Let's try to find a solution, since I believe more users might be interested in such a feature.

Thanks guys,

navi

Does anyone know how I can display a list of (let's say) 5 members that have visited my profile page recently? Shouldn't be too hard, should it?

Let's try to find a solution, since I believe more users might be interested in such a feature.

Thanks guys,

navi

http://sourceforge.net/projects/phploginsystemw/
I edited the jpmaster77 login system of evolt.org

you can see on the table there is active guests, active users table...you can modify that to get the domain name and ip or remote address of the one who visited your website you can modify the query on database.php to list all your active members, user, guest.

i m using class structure..
pls give me working example here with the help of classes..
thanks in advance.

every time they login add the active user on your database.

$database->addActiveUser($this->username, $this->time);

function addActiveUser($username, $time){
      $q = "UPDATE ".TBL_USERS." SET timestamp = '$time' WHERE username = '$username'";
      mysql_query($q, $this->connection);
      
      if(!TRACK_VISITORS) return;
      $q = "REPLACE INTO ".TBL_ACTIVE_USERS." VALUES ('$username', '$time')";
      mysql_query($q, $this->connection);
      $this->calcNumActiveUsers();
   }


it is on my code I have given to you....

you add the user and do not remove them if you still want them stay on your database. 

query your table using the username and the timestamps.

I know you can make it...

if they are the guest get their time and IP address

         $database->addActiveGuest($_SERVER['REMOTE_ADDR'], $this->time); 

   /* addActiveGuest - Adds guest to active guests table */
   function addActiveGuest($ip, $time){
      if(!TRACK_VISITORS) return;
      $q = "REPLACE INTO ".TBL_ACTIVE_GUESTS." VALUES ('$ip', '$time')";
      mysql_query($q, $this->connection);
      $this->calcNumActiveGuests();
   }

hope you can modify that code.

can u pls provide me the whole code and database?
pls its urgent.. i vil be very thankful to you...

can u pls provide me the whole code and database?
pls its urgent.. i vil be very thankful to you...

download this http://sourceforge.net/projects/phploginsystemw/ and open the include/database.php
you will see all the database function and the 3g.sql to create all your database. Modify the code according to your need.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.