<?php require_once 'curl.func.php'; $appkey = 'your_appkey_here'; $pic = '';//图片1 pic,pic2格式要统一 都为图片 或者都为base64 $pic2 = '';//图片2 $url = "https://api.jisuapi.com/facecompare/compare?appkey=$appkey"; $post = array('pic'=>$pic,'pic2'=>$pic2); $result = curlOpen($url, array('post'=>$post, 'isupfile'=>true)); $jsonarr = json_decode($result, true); //exit(var_dump($jsonarr)); if($jsonarr['status'] != 0) { echo $jsonarr['msg']; exit(); } $result = $jsonarr['result']; echo $result['score'].'
';