Page 1 of 1
Issue with Hand Callbacks
Posted: Thu Jul 18, 2013 1:07 pm
by Superderp
I was successfully using the callback feature to record information about hands played but randomly one day after our VPS failed the callback feature stopped working despite not changing the PHP URL it was posting info to.
I have Callbacks Enabled, the correct URL to post the info to is set and "Hand Events" are set to yes.
It seems as if the URL isn't even being called as I have it set to send me a pop-up message on the poker client whenever the page is visited or called remotely, which should be happening at the end of every hand played on the client.
I've tried manually posting the correct info to the page using the PHP cURL functions and everything works perfectly (I receive a message and the hand info is properly stored in a database) so I highly doubt its a Syntax problem (Not to mention it worked fine before).
I've pretty much run out of ideas, if anyone has any suggestions on how I could diagnose the problem it'd be much appreciated. I can post some of my code as well if it helps.
Re: Issue with Hand Callbacks
Posted: Thu Jul 18, 2013 1:38 pm
by Kent Briggs
Superderp wrote:I was successfully using the callback feature to record information about hands played but randomly one day after our VPS failed the callback feature stopped working despite not changing the PHP URL it was posting info to.
Is anything being recorded in the error log? Are you using the callback on other (non hand) events? If so, are they working?
Re: Issue with Hand Callbacks
Posted: Thu Jul 18, 2013 2:50 pm
by Superderp
Kent Briggs wrote:Superderp wrote:I was successfully using the callback feature to record information about hands played but randomly one day after our VPS failed the callback feature stopped working despite not changing the PHP URL it was posting info to.
Is anything being recorded in the error log? Are you using the callback on other (non hand) events? If so, are they working?
Nope, no indication that the url was called appears in both the error log and event log after each hand (API events should be showing up such as LogsHandHistory).
Up until now I was only using the Hand event callback but I just tested it with the Balance event callback and its still not working.
I've even changed the callback php script to simply send me a message on the client when its called to rule out any syntax errors with my actual script.
The PHP script of the callback URL:
Code: Select all
<?php
require_once "API.php";
$message = "Success";
$connectParam = "Password=" . $pw . "&Command=ConnectionsList" . "&Fields=Player,SessionID";
$connectList = Poker_API($url,$connectParam,true);
//Number of connections
$connected = $connectList["Connections"];
//Searches through names of connections until desired user to send message is found and then sends message to them.
for ($i=1;$i <= $connected ; $i++){
$playerOn = strtolower($connectList["Player" . $i]);
if ( $playerOn == 'Superderp'){
$messageParam = "Password=" . $pw . "&Command=ConnectionsMessage" . "&SessionID=" . $connectList["SessionID" . $i] . "&Message=" . $message ;
$sendMessage = Poker_API($url,$messageParam,true);
break;
}
}
?>
Visiting the callback url manually sends this message without any issues.
Re: Issue with Hand Callbacks
Posted: Thu Jul 18, 2013 4:06 pm
by Kent Briggs
Have you restarted your system recently? If not, try that first. Try just making a very simple PHP script like this:
Code: Select all
<?php
$f = fopen("Callback.txt","a");
$event = $_POST["Event"];
$time = $_POST["Time"];
fwrite($f,"Event = " . $event . "\n");
fwrite($f,"Time = " . $time . "\n");
fwrite($f,"\n");
fclose($f);
?>
Call it Callback.php or whatever you want. Set the Callback URL to point to it and turn on all the Event types. Log in and out or do something to trigger at least one event and then see if a file called Callback.txt gets created in the same folder as the php file. And if not, check to see if anything got written to the error log.
Re: Issue with Hand Callbacks
Posted: Sat Jul 20, 2013 1:40 pm
by Superderp
Restarting the server solved the issue, thanks

.