Skip to content

Update instapush.php response from server#5

Open
gitmayer wants to merge 1 commit intopushbots:masterfrom
gitmayer:patch-1
Open

Update instapush.php response from server#5
gitmayer wants to merge 1 commit intopushbots:masterfrom
gitmayer:patch-1

Conversation

@gitmayer
Copy link
Copy Markdown

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