I was not able to find any good examples so I made one specific for php and hall.com's api
I use it to notify the helpdesk lobby of an incoming call on my freePBX :)
<?php
function HallAPI($message) {
$data = array("title" => "Alert", "message" => $message, "picture" => "http://domain.com/logo.jpg");
$data_string = json_encode($data);
$result = @file_get_contents('https://hall.com/api/1/services/generic/*********APIKEY*******', null, stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => 'Content-Type: application/json' . "\r\n"
. 'Content-Length: ' . strlen($data_string) . "\r\n",
'content' => $data_string,
),
)));
};
HallAPI("Test");
?>
Continue reading

I Left WordPress Two Weeks Before PHP2Shell. Talk About Timing.
Two weeks after moving my neglected WordPress blog to emDash, critical PHP vulnerabilities threw the internet into emergency patching mode. Sometimes good architecture and good luck go hand in hand.

Goodbye WordPress, Hello emDash

No comments yet