The hand history format was specifically designed to be both human readable and machine parseable. In fact, I use a nearly identical hand history format as all the online poker sites. See the PokerStars sample below. And all the various poker stats programs, including the two bigs ones (PokerTracker and PokerOffice) parse these files into databases for displaying all kinds of stats. There's nothing inherent in PHP (compared to any other language) that would prevent you from doing the same.vpalmer wrote:The problem we're running into is that the history is very "conversational" in tone, and hard to parse with PHP.
Code: Select all
PokerStars Game #28197689368: Tournament #163711838, 10000+325 Hold'em No Limit - Level I (10/20) - 2009/05/14 17:18:46 ET
Table '163711838 1' 6-max Seat #4 is the button
Seat 1: sKire_Pro (880 in chips)
Seat 2: Gorchik (990 in chips)
Seat 3: BARON1405 (1220 in chips)
Seat 4: drata101 (1150 in chips)
Seat 5: PokerMavens (980 in chips)
Seat 6: bob29532 (780 in chips)
PokerMavens: posts small blind 10
bob29532: posts big blind 20
*** HOLE CARDS ***
Dealt to PokerMavens [6d 7d]
sKire_Pro: calls 20
Gorchik: calls 20
BARON1405: calls 20
drata101: folds
PokerMavens: calls 10
bob29532: checks
*** FLOP *** [5c 5h Ac]
PokerMavens: checks
bob29532: checks
sKire_Pro: checks
Gorchik: checks
BARON1405: checks
*** TURN *** [5c 5h Ac] [7s]
PokerMavens: checks
bob29532: bets 20
sKire_Pro: folds
Gorchik: raises 40 to 60
BARON1405: calls 60
PokerMavens: folds
bob29532: calls 40
*** RIVER *** [5c 5h Ac 7s] [3h]
bob29532: bets 700 and is all-in
Gorchik: raises 210 to 910 and is all-in
BARON1405: folds
Uncalled bet (210) returned to Gorchik
*** SHOW DOWN ***
Gorchik: shows [5d 6c] (three of a kind, Fives)
bob29532: shows [5s Td] (three of a kind, Fives - Ace+Ten kicker)
bob29532 collected 1680 from pot
*** SUMMARY ***
Total pot 1680 | Rake 0
Board [5c 5h Ac 7s 3h]
Seat 1: sKire_Pro folded on the Turn
Seat 2: Gorchik showed [5d 6c] and lost with three of a kind, Fives
Seat 3: BARON1405 folded on the River
Seat 4: drata101 (button) folded before Flop (didn't bet)
Seat 5: PokerMavens (small blind) folded on the Turn
Seat 6: bob29532 (big blind) showed [5s Td] and won (1680) with three of a kind, Fives