<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
comcast / splunk-http-event-collector-handler example snippets
use Comcast\SplunkHttpEventCollectorHandler\SplunkClient;
$client = new SplunkClient();
if (!$client->sendEvent([
'event' => [
'your data here',
],
'index' => 'my-index', // You can set the index for this request here, or use the default for your HEC Token
'sourcetype' => 'my-sourcetype', // You can set the sourcetype for this request here, or use the default for your HEC Token
])) {
$error = $client->getError();
}