Email Triggered Send (post)

Email Triggered Send (post) | Send a triggered email.
<?php
//example PHP code to send a triggered email
//set values for triggered email
$post_params['apiKey']="APIKEY_HERE";
$post_params['jobId']="JOBID_HERE"; //Job Id of message to send.
$post_params['emailId']="EMAILID_HERE"; //Id of the subscriber to send the message to.

$url = 'http://apidomain.com/api2/email/triggered/send';
 
//Posts this using CURL
$curl = curl_init($url);
curl_setopt ($curl, CURLOPT_POST, 1);
curl_setopt ($curl, CURLOPT_POSTFIELDS, $post_params);
curl_setopt ($curl, CURLOPT_CONNECTTIMEOUT, 100);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($curl);
curl_close ($curl);
echo $result;

//Parse the json to get return values. 
$parsed_result = json_decode($result,false);
echo "<br><br>Status: $parsed_result->status";
echo "<br>Message: $parsed_result->message";
echo "<br>Error Code: $parsed_result->errorcode";
echo "<br>Error Message: $parsed_result->errormessage";
?>