LogsHandHistory and Hand

For general discussion of the Poker Mavens software
Post Reply
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

LogsHandHistory and Hand

Post by Tuck Fheman »

In the callback area, what should I expect to get from $HandHistory in this instance?

As is, I'm getting nothing in return it appears. I assumed I would get the $HandHum's history for that hand and I could search it for a certain string. Note : I'm just learning PHP/coding so I'm likely missing something stupid and I'm not really asking for help with the coding, just what I should be getting when accessing the "Hand" parameter via the API.

Thanks for any assistance!

Code: Select all

case "Hand":
      fwrite($f,"Event = " . $event . "\n");
      fwrite($f,"Hand = " .  $_POST["Hand"] . "\n");
      fwrite($f,"Type = " .  $_POST["Type"] . "\n");
      fwrite($f,"Name = " .  $_POST["Name"] . "\n");
      fwrite($f,"Table = " . $_POST["Table"] . "\n");
      fwrite($f,"Time = " .  $_POST["Time"] . "\n");
      fwrite($f,"\n");
	  
	  $HandNum = $_POST["Hand"];
	  $params = array("Command" => "LogsHandHistory", "Hand" => $HandNum);
	  $api = Poker_API($params);
	  $result = $api -> Result;
	  $HandHistory = $api -> Hand;
Kent Briggs
Site Admin
Posts: 5880
Joined: Wed Mar 19, 2008 8:47 pm

Re: LogsHandHistory and Hand

Post by Kent Briggs »

Change this:

Code: Select all

$HandHistory = $api -> Hand;
to this:

Code: Select all

$HandHistory = $api -> Data;
Kent Briggs
Site Admin
Posts: 5880
Joined: Wed Mar 19, 2008 8:47 pm

Re: LogsHandHistory and Hand

Post by Kent Briggs »

By the way, Data is returned as an array so if you want to step through each line it would look something like this:

Code: Select all

echo "<pre>\n";
for ($i = 0; $i < count($api -> Data); $i++) echo $api -> Data[$i] . "\n";
echo "</pre>\n";
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

Re: LogsHandHistory and Hand

Post by Tuck Fheman »

Thank you so much!
Post Reply