作者 赵彬吉

update

@@ -332,17 +332,7 @@ class RelayInquiry extends Command @@ -332,17 +332,7 @@ class RelayInquiry extends Command
332 try { 332 try {
333 $res = false; 333 $res = false;
334 foreach ($ad_task as $task){ 334 foreach ($ad_task as $task){
335 - //需要多个ip访问的国家 随机2-5次访问,只有一次询盘  
336 - if (in_array($val->country_name, $this->multiple_ip_visit_country)) {  
337 - $times = mt_rand(2, 5); //随机次数  
338 - $inquiry_time = mt_rand(1, $times); //第几次询盘  
339 - $this->output('多次访问模拟:' . $times);  
340 - for ($i = 1; $i <= $times; $i++) {  
341 - $res += $this->relayDetail($task, $val, $inquiry_time == $i);  
342 - }  
343 - }else{  
344 $res += $this->relayDetail($task, $val); 335 $res += $this->relayDetail($task, $val);
345 - }  
346 $res += $this->relayShopDetail($task, $val); 336 $res += $this->relayShopDetail($task, $val);
347 $res += $this->relayFobDetail($task, $val); 337 $res += $this->relayFobDetail($task, $val);
348 } 338 }
@@ -405,7 +395,7 @@ class RelayInquiry extends Command @@ -405,7 +395,7 @@ class RelayInquiry extends Command
405 * @param $form 395 * @param $form
406 * @return bool 396 * @return bool
407 */ 397 */
408 - public function relayDetail($task, $form, $is_inquiry = true) 398 + public function relayDetail($task, $form)
409 { 399 {
410 $this->output('获取转发对象'); 400 $this->output('获取转发对象');
411 if(empty($task['target'] )){ 401 if(empty($task['target'] )){
@@ -441,6 +431,16 @@ class RelayInquiry extends Command @@ -441,6 +431,16 @@ class RelayInquiry extends Command
441 } 431 }
442 $this->logChannel()->info('随机域名', array_column($random_data, 'url')); 432 $this->logChannel()->info('随机域名', array_column($random_data, 'url'));
443 foreach ($random_data as $item) { 433 foreach ($random_data as $item) {
  434 + //需要多个ip访问的国家 随机2-5次访问,只有一次询盘
  435 + $times = 1;
  436 + $inquiry_time = 1;
  437 + if (in_array($form->country_name, $this->multiple_ip_visit_country)) {
  438 + $times = mt_rand(2, 5); //随机次数
  439 + $inquiry_time = mt_rand(1, $times); //第几次询盘
  440 + $this->output('多次访问模拟:' . $times);
  441 + }
  442 + for ($i = 1; $i <= $times; $i++) {
  443 + $is_inquiry = $inquiry_time == $i;
444 //手机号过滤 444 //手机号过滤
445 $phone = $form->phone; 445 $phone = $form->phone;
446 $filter_phone = $this->get_rand($this->filter_phone); 446 $filter_phone = $this->get_rand($this->filter_phone);
@@ -500,6 +500,7 @@ class RelayInquiry extends Command @@ -500,6 +500,7 @@ class RelayInquiry extends Command
500 } 500 }
501 } 501 }
502 } 502 }
  503 + }
503 return true; 504 return true;
504 } 505 }
505 506