include_once('config.php'); $resultName = (isset($_REQUEST["result"])) ? $_REQUEST["result"] : ""; if(!empty($resultName)) { // show the result include('result.php'); } else { // get the file $fileName = (isset($_REQUEST["name"])) ? $_REQUEST["name"] : ""; if($fileName != '') { // include the SkyBiometry library include_once("lib/FCClientPHP-master/FCClientPHP.php"); $apiKey = "1a86256e37c04108973ebfefae8d47c6"; $apiSecret = "4a6110910ef34fff9cabb5188a4f0125"; $nameSpace = "HideMyFace"; $client = new FCClientPHP($apiKey, $apiSecret); $path = "http://" . $_SERVER["HTTP_HOST"] . "/" . "images/"; echo "
Rezultat ".serialize($result). " scris in /results/" . $fileName . ".json"; $detect = $client->faces_recognize($path . $fileName, null, null, null, $detector = null, $attributes = null); // var_dump("faces_recognize result:", $detect); $result_detect = file_put_contents(dirname(__FILE__) . "/results/detect_" . $fileName . ".json", serialize($detect)); echo "
Rezultat ".serialize($result). ". Rezultat ".serialize($result_detect)." scris in /results/" . $fileName . ".json"; echo "
Executa procesarea Ascundere fetze"; } else { echo "
Go to upload page"; // get the list of the results include('listdirectory.php'); $results = listDirectory(dirname(__FILE__) . "/results"); echo "
Or use the existent processed images:"; echo "