diff --git a/application/controllers/keyworlds.php b/application/controllers/keyworlds.php
index 1c6706db..4a0e7cbf 100644
--- a/application/controllers/keyworlds.php
+++ b/application/controllers/keyworlds.php
@@ -95,8 +95,6 @@ class Keyworlds extends CI_Controller {
}
}
}
-// print_r($data['wordcount']);
-// print_r($rank_json);
// 拼接highcharts数据格式
$data['rank_json'] = '[';
foreach ($rank_json as &$ra) {
@@ -134,10 +132,10 @@ class Keyworlds extends CI_Controller {
}
}
$data['rank_json'] = substr($data['rank_json'], 0, -1) . ']';
-// print_r($data['rank_json']);
$data['data_time'] = json_encode($data_time);
$data['rank_info'] = '';
isset($rank_json[$data['current_keyworld']->kw_id]) && $data['rank_info'] = $rank_json[$data['current_keyworld']->kw_id];
+ arsort($data['rank_info']);
}
} else {
redirect(site_url("Keyworlds/index"));
@@ -297,7 +295,7 @@ class Keyworlds extends CI_Controller {
$j = $i;
$rank = $this->$method($client_flag, $keyworlds, $site_url, $j, $site_code);
// 仅更新一个字段
- if (intval($rank['rank']) == 0) {
+ if (intval($rank['rank']) === 0) {
$rank['rank'] = $last_rank[0]->kwr_rank;
$rank['source'] = $last_rank[0]->kwr_source;
} else {
@@ -327,7 +325,11 @@ class Keyworlds extends CI_Controller {
$this->Keywords_model->update_time($kw_id);
}
}
- $data[] = array('name' => 'rank', 'value' => ($rank['rank'] . " -- " . $rank["rank_m"]));
+ $data[] = array(
+ 'name' => 'rank',
+ 'value' => ($rank['rank'] . " / " . $rank["rank_m"]),
+ 'real' => $rank_flag . " : " . $rank[$rank_flag]
+ );
echo json_encode($data);
return TRUE;
}
@@ -368,7 +370,8 @@ class Keyworlds extends CI_Controller {
} else if ($engines == 'yandex') {//俄语站的yangdex
$rank = $this->get_search_content_by_yandex($client_flag,$v->kw_keyworlds, $site_url, $i - 1);
}
- if (intval($rank['rank']) == 0) {
+
+ if (intval($rank['rank']) === 0) {
$rank['rank'] = $last_rank[0]->kwr_rank;
$rank['source'] = $last_rank[0]->kwr_source;
} else {
@@ -648,8 +651,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);
}
diff --git a/application/views/keyworlds/index.php b/application/views/keyworlds/index.php
index 0fb8187d..979c8b6b 100644
--- a/application/views/keyworlds/index.php
+++ b/application/views/keyworlds/index.php
@@ -62,8 +62,8 @@
kwr_mobile_source; ?>
-