This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* ---- PLEASE MAKE SURE YOUR ENCODING IS: UTF-8 (without BOM) ---- */ | |
$jsonString = file_get_contents("php://input"); /* Get the RAW POST DATA */ | |
/* Validate signature */ | |
if ( ! ( isset($_SERVER['HTTP_MINI_SIGNATURE']) | |
&& $_SERVER['HTTP_MINI_SIGNATURE'] == md5("[YOUR_API_KEY]".$jsonString) )) { | |
throw new Exception("Invalid signature"); | |
} | |
/* Decode the JSON string received and convert it to an associative array */ |
OlderNewer