Welcome to our new users - php code

For discussion of the Poker Mavens server module and other administration topics

Welcome to our new users - php code

Postby pzero » Sat Dec 19, 2009 4:26 am

I have added this code onto my front page which will welcome new accounts, who have logged in less than 10 times. Come login #11 they will disappear off this list.

Code: Select all

include "API.php"; // API $url and $pw values set here

    // Fetch the list of players using the AccountsList API command.

    $params = "Password=" . $pw . "&Command=AccountsList&Fields=Player,Logins";
    $api = Poker_API($url,$params,true);
    $result = $api["Result"];
    if ($result == "Error") die("Error: " . $api["Error"]);

    // iterate through list

    for ($i=1; $i<=$api["Accounts"]; $i++)
    {
   
      if (($api["Logins" .$i] <= 10))
      {
      echo '<ul><li>';
      echo $api["Player" .$i] .'</ul>';
      }

   }
?>
pzero
 
Posts: 20
Joined: Thu Nov 26, 2009 3:59 am
Location: Australia

Re: Welcome to our new users - php code

Postby social » Sun Dec 20, 2009 7:26 pm

Thanks for sharing. :D
social
 
Posts: 201
Joined: Fri Nov 20, 2009 12:23 am


Return to Site Administration

Who is online

Users browsing this forum: No registered users and 6 guests

cron