diff --git a/application/third_party/tuniu/controllers/tuniu_train.php b/application/third_party/tuniu/controllers/tuniu_train.php index e1c82793..559fba16 100644 --- a/application/third_party/tuniu/controllers/tuniu_train.php +++ b/application/third_party/tuniu/controllers/tuniu_train.php @@ -19,17 +19,6 @@ class Tuniu_train extends CI_Controller{ $this->load->model("tuniuprice_model"); } - public function test_response(){ - sleep(44); - echo '123'; - } - - public function test_post(){ - $url = 'http://cht.mycht.cn/info.php/apps/tuniu/tuniu_train/test_response/'; - $data = post_tuniu($url,'',$method = 'POST'); - echo $data; - } - //创建请求签名 public function create_sign(){ $time = date('Y-m-d H:i:s',time()); diff --git a/application/third_party/tuniu/helpers/tuniu_helper.php b/application/third_party/tuniu/helpers/tuniu_helper.php index 7c6a4324..eb76527d 100644 --- a/application/third_party/tuniu/helpers/tuniu_helper.php +++ b/application/third_party/tuniu/helpers/tuniu_helper.php @@ -44,8 +44,8 @@ curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包 curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json')); } - curl_setopt($curl, CURLOPT_TIMEOUT, 45); // 设置超时限制防止死循环 - curl_setopt($curl, CURLOPT_TIMEOUT_MS, 45000); // 设置超时限制防止死循环 + curl_setopt($curl, CURLOPT_TIMEOUT, 25); // 设置超时限制防止死循环 + curl_setopt($curl, CURLOPT_TIMEOUT_MS, 25000); // 设置超时限制防止死循环 curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容 curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回 $tmpInfo = curl_exec($curl); // 执行操作