rizoa
1/15/2018 - 5:54 PM

loggly.php

$dat = json_encode([
    'from' => 'ikamai-semrush',
    'message' => number_format($time,2)
  ]);
  $token = '';
  $res = json_decode(file_get_contents('http://logs-01.loggly.com/inputs/'.$token.'/tag/heartbeat/',null,stream_context_create(array(
    'http' => array(
      'method'           => 'POST',
      'header'           => "Content-type: application/json\r\n".
                            "Content-length: " . strlen($dat) . "\r\n",
      'content'          => $dat,
    ),
  ))));