Skip to content

Instantly share code, notes, and snippets.

@mremond
Created February 6, 2014 11:36
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mremond/8842531 to your computer and use it in GitHub Desktop.
Save mremond/8842531 to your computer and use it in GitHub Desktop.
Send a Boxcar notification to your device in PHP
<?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