作者 赵彬吉

proxy

@@ -70,7 +70,12 @@ class SyncProject extends Command @@ -70,7 +70,12 @@ class SyncProject extends Command
70 $is_update = $item['data']['is_update']??0;//是否是4.0或5.0更新到6.0 70 $is_update = $item['data']['is_update']??0;//是否是4.0或5.0更新到6.0
71 $order_id = $item['data']['order_id']; 71 $order_id = $item['data']['order_id'];
72 if($is_update == 1){ 72 if($is_update == 1){
73 - $data = http_get('https://quanqiusou.cn/extend_api/v6/update.php?postid='.$order_id, ['charset' => 'UTF-8']); 73 +// $data = http_get('https://quanqiusou.cn/extend_api/v6/update.php?postid='.$order_id, ['charset' => 'UTF-8']);
  74 + $client = new \GuzzleHttp\Client();
  75 + $data = $client->request('GET', 'https://quanqiusou.cn/extend_api/v6/update.php?postid='.$order_id, [
  76 + 'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
  77 + ])->getBody()->getContents();
  78 + $data = json_decode($data, true);
74 }else{ 79 }else{
75 $api = new OaGlobalsoApi(); 80 $api = new OaGlobalsoApi();
76 $data = $api->order_info($order_id); 81 $data = $api->order_info($order_id);
@@ -38,7 +38,12 @@ class SyncMobile extends Command @@ -38,7 +38,12 @@ class SyncMobile extends Command
38 */ 38 */
39 public function handle(){ 39 public function handle(){
40 $url = 'https://www.quanqiusou.cn/extend_api/saas/get_phone.php'; 40 $url = 'https://www.quanqiusou.cn/extend_api/saas/get_phone.php';
41 - $data = curlGet($url);//TODO::获取号码库 41 +// $data = curlGet($url);//TODO::获取号码库
  42 + $client = new \GuzzleHttp\Client();
  43 + $data = $client->request('GET', $url, [
  44 + 'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
  45 + ])->getBody()->getContents();
  46 + $data = json_decode($data, true);
42 DB::table('gl_mobile')->delete(); 47 DB::table('gl_mobile')->delete();
43 $create_time = date('Y-m-d H:i:s'); 48 $create_time = date('Y-m-d H:i:s');
44 foreach ($data as $v){ 49 foreach ($data as $v){
@@ -98,11 +98,10 @@ class QuanqiusouApi @@ -98,11 +98,10 @@ class QuanqiusouApi
98 try { 98 try {
99 //$res = HttpUtils::get($api_url, []); 99 //$res = HttpUtils::get($api_url, []);
100 $client = new Client(); 100 $client = new Client();
101 - $response = $client->request('GET', $api_url, [  
102 - 'proxy' => '64.34.204.224:51395', // 代理服务器地址和端口号 101 + $res = $client->request('GET', $api_url, [
  102 + 'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
103 // 其他请求选项 103 // 其他请求选项
104 - ]);  
105 - $res = $response->getBody()->getContents(); 104 + ])->getBody()->getContents();
106 if($res){ 105 if($res){
107 $res = Arr::s2a($res); 106 $res = Arr::s2a($res);
108 Cache::put($key, $res, 2 * 3600); 107 Cache::put($key, $res, 2 * 3600);
@@ -586,7 +586,11 @@ class RankDataLogic extends BaseLogic @@ -586,7 +586,11 @@ class RankDataLogic extends BaseLogic
586 586
587 //5.0 587 //5.0
588 try { 588 try {
589 - $data = HttpUtils::get("https://www.quanqiusou.cn/semrush-api/data_json/{$api_no}.json", []); 589 +// $data = HttpUtils::get("https://www.quanqiusou.cn/semrush-api/data_json/{$api_no}.json", []);
  590 + $client = new \GuzzleHttp\Client();
  591 + $data = $client->request('GET', "https://www.quanqiusou.cn/semrush-api/data_json/{$api_no}.json", [
  592 + 'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
  593 + ])->getBody()->getContents();
590 $data = Arr::s2a($data); 594 $data = Arr::s2a($data);
591 }catch (\Exception $e){ 595 }catch (\Exception $e){
592 $data = []; 596 $data = [];
@@ -668,7 +672,11 @@ class RankDataLogic extends BaseLogic @@ -668,7 +672,11 @@ class RankDataLogic extends BaseLogic
668 672
669 //5.0 673 //5.0
670 try { 674 try {
671 - $data = HttpUtils::get("https://www.quanqiusou.cn/semrush-api/data_json/{$api_no}.json", []); 675 +// $data = HttpUtils::get("https://www.quanqiusou.cn/semrush-api/data_json/{$api_no}.json", []);
  676 + $client = new \GuzzleHttp\Client();
  677 + $data = $client->request('GET', "https://www.quanqiusou.cn/semrush-api/data_json/{$api_no}.json", [
  678 + 'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
  679 + ])->getBody()->getContents();
672 $data = Arr::s2a($data)['list']; 680 $data = Arr::s2a($data)['list'];
673 }catch (\Exception $e){ 681 }catch (\Exception $e){
674 $data = []; 682 $data = [];