Skip to content

Instantly share code, notes, and snippets.

@mrcampbell
Created June 7, 2017 17:07
Show Gist options
  • Save mrcampbell/ad3fd8f73a26836a91187c4d3e3e7102 to your computer and use it in GitHub Desktop.
Save mrcampbell/ad3fd8f73a26836a91187c4d3e3e7102 to your computer and use it in GitHub Desktop.
<?php
echo "Hello World!";
function sendPushOverDebug($title, $message)
{
echo <<<END
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
var data = {
'token' : 'TOKEN',
'user' : 'USER_KEY',
'title' : '$title',
'message' : '$message'
}
$.post('https://api.pushover.net/1/messages.json', data, function(result){
console.log(result)
});
</script>
END;
}
sendPushOverDebug('CallFunction', 'ThisIsMyMessage');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment