|
|
|
@ -449,11 +449,11 @@ class Keyworlds extends CI_Controller {
|
|
|
|
|
|
|
|
|
|
//抓取google搜索结果
|
|
|
|
|
$url = "https://www.$google_url/search?q=$search_worlds&start=$start&num=50&hl=$language";
|
|
|
|
|
$match_fun = '/<h3 class="r">(.*)<\/h3>/smUi';
|
|
|
|
|
$match_fun = '/<h3 class=\"r\">(.*)<\/h3>/smUi';
|
|
|
|
|
$rank_flag = 'rank';
|
|
|
|
|
$source_flag = 'source';
|
|
|
|
|
if ($client_flag == 'm') {
|
|
|
|
|
$match_fun = '/<a class="_Olt _bCp"(.*)<div/smUi';
|
|
|
|
|
$match_fun = '/<a class=\"_Olt _bCp\"(.*)<div/smUi';
|
|
|
|
|
$rank_flag = 'rank_m';
|
|
|
|
|
$source_flag = 'source_m';
|
|
|
|
|
}
|
|
|
|
@ -517,7 +517,7 @@ class Keyworlds extends CI_Controller {
|
|
|
|
|
$rank_flag = 'rank';
|
|
|
|
|
$source_flag = 'source';
|
|
|
|
|
if ($client_flag == 'm') {
|
|
|
|
|
$match_fun = '/<a class="link link_theme_normal organic__url i-bem"(.*)class=/smUi';
|
|
|
|
|
$match_fun = '/<a class=\"link link_theme_normal organic__url i-bem\"(.*)class=/smUi';
|
|
|
|
|
$rank_flag = 'rank_m';
|
|
|
|
|
$source_flag = 'source_m';
|
|
|
|
|
}
|
|
|
|
@ -663,8 +663,8 @@ class Keyworlds extends CI_Controller {
|
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
|
|
|
|
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
|
|
|
|
|
// curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
|
|
|
|
// curl_setopt($ch, CURLOPT_PROXY, "202.103.68.28:11111"); // 本地代理
|
|
|
|
|
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
|
|
|
|
curl_setopt($ch, CURLOPT_PROXY, "202.103.68.28:11111"); // 本地代理
|
|
|
|
|
if ($referer) {
|
|
|
|
|
curl_setopt($ch, CURLOPT_REFERER, $referer);
|
|
|
|
|
}
|
|
|
|
|