WHMAP.ION Utility
The WHMAP Instant Order Notification or ION Technology is our latest feature. If configured properly, WHMAP ION will send a form post containing the client data, order data, invoice data and register data to a specified URL(s) for every new order. The ION handler then verifies the form post with the WHMAP ION server, returning a simple "PASSED" or "FAILED" response.
If the WHMAP ION server returns "PASSED" you know the form post is legitimate. The possibilities of this new technology are endless, as you can imagine.
Example ION Handler
<?PHP function validte_ion($verify_sign) { $request = "verify_sign={$verify_sign}";
$header = "POST /ion/validate_ion.php HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($request) . "rnrn";
$fp=@fsockopen("example.com", 80, $errno, $errstr, 30);
if (!$fp) { return false; } else { fputs($fp, $header, $request); while(!feof($fp)) { $data = fgets($fp, 1024);
if (strcasecmp($data, 'PASSED') == 0) { return true; } else { return false; } }
fclose($fp); }
return false; }
if ((!isset($_POST['verify_sign']))||($_POST['verify_sign']=='')) { // nothing to do exit; }
if (!validate_ion($_POST['verify_sign'])) { // nothing to do exit; }
// do something! it's a valid ION POST!! ?>
|