PHP Classes

Csx PHP Texas Holdem Poker: Manage and display Texas Holdem cards

Recommend this page to a friend!
  Info   View files Example   Screenshots Screenshots   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 39%Total: 863 All time: 4,060 This week: 571Up
Version License PHP version Categories
csxtexasholdempoker 1.0GNU General Publi...4.0Games


This class can be used to manage and display Texas Holdem cards.

It can shuffle the cards, deal the cards and evaluate hands.

The class can also present the cards in an hand by using separate image files.

Picture of Martijn Loots
Name: Martijn Loots <contact>
Classes: 2 packages by
Country: The Netherlands The Netherlands
Age: 61
All time rank: 55215 in The Netherlands The Netherlands
Week rank: 280 Up7 in The Netherlands The Netherlands Up



//// Version : index.html to CsxTexasHoldemPoker.class.php version 1.0
//// Author : (c) 2008 Martijn Loots, Cosix Automatisering, The Netherlands
//// See also:
//// License : GNU General Public License, see "gnugpl.txt" for more
//// information

// Cosix Texas Hold'em Poker - demo of class

include_once "CsxTexasHoldemPoker.class.php";

showgame($theGame) {



"<p>Community cards:&nbsp;";
$theGame->showFlop(); echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";

$theGame->showTurn(); echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";

$theGame->showRiver(); echo "</p>";


if (isset(
$_REQUEST["thpsel"])) {
$thpsel = (($thpsin = $_REQUEST["thpsel"]) < 2 || $thpsin > 9) ? 0 : $thpsin;

    <title>CsxTexasHoldemPoker Class Demo</title>
    <h2>CsxTexasHoldemPoker class - PHP Texas Holdem Poker engine - <a href="demo.html"
    <form name="thpform" action="demo.php" method="POST">
      CsxTexasHoldemPoker Class - Select game:&nbsp;
      <select name="thpsel">
        <option value="0"<?if($thpsel==0)echo" SELECTED";?>>- select number of players -</option>
        <option value="2"<?if($thpsel==2)echo" SELECTED";?>>Heads Up</option>
        <option value="3"<?if($thpsel==3)echo" SELECTED";?>>Three Handed</option>
        <option value="4"<?if($thpsel==4)echo" SELECTED";?>>Four Handed</option>
        <option value="5"<?if($thpsel==5)echo" SELECTED";?>>Five Players</option>
        <option value="6"<?if($thpsel==6)echo" SELECTED";?>>Six Players</option>
        <option value="7"<?if($thpsel==7)echo" SELECTED";?>>Seven Up</option>
        <option value="8"<?if($thpsel==8)echo" SELECTED";?>>Eight Players</option>
        <option value="9"<?if($thpsel==9)echo" SELECTED";?>>Nine's a crowd</option>
      &nbsp;<input type="submit" name="sub" value="Go (again ?)" />
if ($thpsel > 1 && $thpsel < 10) {
$game = new csxTexasHoldemPoker($thpsel);


//// //// Version : README to CsxTexasHoldemPoker.class.php version 1.0 //// //// Author : (c) 2008 Martijn Loots, Cosix Automatisering, The Netherlands //// See also: //// //// License : GNU General Public License, see "gnugpl.txt" for more //// information //// Files with the package: CsxTexasHoldemPoker.class.php - the class file index.php - the demo of the class demo.html - brief explanation on functionality cardsbig.tgz -> carddecks/classic - a set of classic card images cardsmed.tgz -> carddecks/medium - the same set a bit smaller cardssml.tgz -> carddecks/small - the same set very tiny gnugpl.txt - the GNU General Public License text index.html (several) - basic browsing prevention Requirements: PHP4 or higher Installation: Just put it in some viewable subdirectory on your webserver. Use: See index.php for a proof of concept implementation and feel free to add even more comments to the class file if you need it...

  • CsxTexasHoldemPoker.png
  Files folder image Files  
File Role Description
Plain text file cardsbig.tgz Data big card images
Plain text file cardsmed.tgz Data medium size card images
Plain text file cardssml.tgz Data small sized card images
Plain text file CsxTexasHoldemPoker.class.php Class Class file
Plain text file demo.html Doc. demo description
Plain text file demo.php Example class demo
Plain text file gnugpl.txt Lic. license
Plain text file README Doc. readme

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:4,060
This week:571Up
 User Ratings  
 All time