I've read the API example of LogsHandHistory regarding Tournament history that has a dropdown menu but what I want to do is instead output the entire hand history logs. I need to know a example of how to do this.
I've tried to look the array but I cannot output it. I dumped the variable $api and saw the array but I couldn't loop anything.
THANK YOU
LogsHandHistory regarding Tournament
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: LogsHandHistory regarding Tournament
I assume you are referring to this:bigboss wrote:I've read the API example of LogsHandHistory regarding Tournament history that has a dropdown menu but what I want to do is instead output the entire hand history logs
http://www.briggsoft.com/docs/pmavens/A ... nd_history
I'm not sure what you are asking. The example does display the entire log for whatever file you select. Or do you mean you want the list of files but you just don't want them in a dropdown menu? If that's the case, just remove all the <select> and <option> references:
Code: Select all
$params = "Password=" . $pw . "&Command=LogsHandHistory";
$api = Poker_API($url,$params,true);
if ($api["Result"] == "Error") die($api["Error"]);
$count = $api["Files"];
for ($i=1; $i<=$count; $i++)
{
$hh = $api["Date" . $i] . " " . $api["Name" . $i];
echo $hh . "<br />";
}
Re: LogsHandHistory regarding Tournament
What I'm trying to do is display (output) every possible option in Logshandhistory to a single variable to be used as $data. That way I'm able to use the preg_match_all function.
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: LogsHandHistory regarding Tournament
You could loop through the array and concatenate the data into a single string. Or just use the implode() function in PHP to do that for you. Or you could modify the Poker_API() function so that it only returns a single string instead of an array of strings. Something like this (untested):bigboss wrote:What I'm trying to do is display (output) every possible option in Logshandhistory to a single variable to be used as $data. That way I'm able to use the preg_match_all function.
Code: Select all
function Poker_API($url,$params)
{
$curl = curl_init($url);
curl_setopt($curl,CURLOPT_POST,true);
curl_setopt($curl,CURLOPT_POSTFIELDS,$params);
curl_setopt($curl,CURLOPT_TIMEOUT,30);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);
$response = trim(curl_exec($curl));
curl_close($curl);
return $response;
}
Re: LogsHandHistory regarding Tournament
thank you kent, that was what i was looking for , will give this a try and see how it goes.
Re: LogsHandHistory regarding Tournament
kent , we did test your example.
The example only output the data that would have been populated inside the drop down menu
Is it possible to get tested example of having all the current LogsHandhistory logs that are available and soon to be available in the future to a single string and/or variable
Thank you
The example only output the data that would have been populated inside the drop down menu
Is it possible to get tested example of having all the current LogsHandhistory logs that are available and soon to be available in the future to a single string and/or variable
Thank you
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: LogsHandHistory regarding Tournament
There is one file created every day for each table, assuming at least one hand was played there. The data is just appended to the end until the server clock hits midnight. Obviously the software isn't going to know if anyone will play in the future.bigboss wrote:Is it possible to get tested example of having all the current LogsHandhistory logs that are available and soon to be available in the future to a single string and/or variable