Created
February 6, 2014 11:36
-
-
Save mremond/8842531 to your computer and use it in GitHub Desktop.
Send a Boxcar notification to your device in PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
curl_setopt_array( | |
$chpush = curl_init(), | |
array( | |
CURLOPT_URL => "https://new.boxcar.io/api/notifications", | |
CURLOPT_POSTFIELDS => array( | |
"user_credentials" => 'ACCESS_TOKEN', | |
"notification[title]" => 'message title', | |
"notification[long_message]" => '<b>Some text or HTML for the full layout page notification</b>', | |
"notification[sound]" => "bird-1", | |
))); | |
$ret = curl_exec($chpush); | |
curl_close($chpush); | |
echo "\n"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment