Skip to content

Instantly share code, notes, and snippets.

@codeInBit
Created February 14, 2017 08:21
Show Gist options
  • Save codeInBit/6220bc89babfe96566b1b19323802f88 to your computer and use it in GitHub Desktop.
Save codeInBit/6220bc89babfe96566b1b19323802f88 to your computer and use it in GitHub Desktop.
$api = "http://push.cellcore.com.ng/api/v1/push";
$header = array(
'Authorization' => "API_KEY"
);
$params = array(
'type' => "txt",
'payload' => "Thanks for choosing Push It....",
'group_msg'=>"1",
'destination'=>"Sample App",
'title'=>"Welcome to Push It!",
'description'=>"You have received a welcome note",
'vibrate'=>"1",
'use_default_alert'=>"0",
);
$push = curl_init();
curl_setopt($push, CURLOPT_URL, $api);
curl_setopt($push, CURLOPT_POST, true);
curl_setopt($push, CURLOPT_HTTPHEADER, $header);
curl_setopt($push, CURLOPT_RETURNTRANSFER, true);
curl_setopt($push, CURLOPT_POSTFIELDS, http_build_query($params));
$result = curl_exec($push);
echo($result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment