接口分需要验证和不需要验证: 需要验证: <?php require_once 'http.class.php' ; $http = new Http(); // 实例化对象 $data = array(); $data['api_key']='2640d9828b0a596aa5b8ced17478d11d'; $api_secret = '34075ffdf5d47037dca7f657058d0b19'; $data['timestamp']=time(); $data['nonce']=rand(); $tmpArr = array($api_secret, $data['timestamp'], $data['nonce']); sort($tmpArr, SORT_STRING); $tmpStr = implode( $tmpArr ); $tmpStr = sha1( $tmpStr ); $data['signature']=$tmpStr; $data['ordertype']=1; $data['platform']='pc'; $result = $http->post('http://demo.projectapi.com/Qiandao/my_order', $data ); print_r($result);