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.
Issue with Hand Callbacks
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Issue with Hand Callbacks
Is anything being recorded in the error log? Are you using the callback on other (non hand) events? If so, are they working?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.
Re: Issue with Hand Callbacks
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).Kent Briggs wrote:Is anything being recorded in the error log? Are you using the callback on other (non hand) events? If so, are they working?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.
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;
}
}
?>
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Issue with Hand Callbacks
Have you restarted your system recently? If not, try that first. Try just making a very simple PHP script like this:
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.
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);
?>
Re: Issue with Hand Callbacks
Restarting the server solved the issue, thanks .