Skip to content

Instantly share code, notes, and snippets.

View shash7's full-sized avatar

Shashwat amin shash7

View GitHub Profile
@shash7
shash7 / ops.php
Last active March 12, 2025 19:55
<?php
function ops($event_name, $data) {
$url = "https://api.operational.co/api/v1/ingest";
$token = "YOUR_API_KEY"; // get a free one from operational.co
$args = array(
'body' => json_encode(array_merge(['name' => $event_name, 'notify' => true], $data)),
'headers' => array(
'Authorization' => 'Bearer ' . $token,
'Content-Type' => 'application/json'