码迷,mamicode.com
首页 > Web开发 > 详细

php curl-class post

时间:2017-08-13 00:03:50      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:eth   php   error   response   deb   info   ati   inf   ons   


use \Curl\Curl;

$curl = new Curl();
$curl->setHeader(‘Content-Type‘, ‘application/json‘);
$curl->post(‘http://yuexingy.top:5100/withdraw/withdraw.php‘, json_encode($data));
if ($curl->error) {
//echo ‘Error: ‘ . $curl->errorCode . ‘: ‘ . $curl->errorMessage . "\n";
Log::debug(‘error:‘ . $curl->errorCode . ‘ errorMessage:‘ . $curl->errorMessage . ‘\n‘);
} else {
Log::info(‘Data server received via POST:‘ . "\n");
//var_dump($curl->response);
$re->Status = 3;
$re->WithdrawPlatform = 2;
$re->save();
}

php curl-class post

标签:eth   php   error   response   deb   info   ati   inf   ons   

原文地址:http://www.cnblogs.com/yuanxiaoping_21cn_com/p/7351854.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!