Skip to content

Conversation

@gitmayer
Copy link

Added code to handle response from server. $success=true if response "error": false. If error in response, $success=full json response.

Usage ("async" -> false):
$result = $ip->track($evt, array(
"message"=> $msg . " " . $stamp
));

if($result===true){
echo "Pushed: [" . $evt . "] - " . $msg . " " . $stamp . "";
}else{
echo "Error: " . $result;
}

Added code to handle response from server.  $success=true if response "error": false.  If error in response, $success=full json response.

Usage ("async" -> false):
$result = $ip->track($evt, array( 
        "message"=> $msg . " " . $stamp
));
  
if($result===true){
  	echo "Pushed: <i>[" . $evt . "] - " . $msg . " " . $stamp . "</i>";
}else{
  	echo "Error: " . $result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant