360 Search engine auto-ingest function, the official provided code, with the type, very pit dad, did not provide bulk submission portal, just provide a section of JS code, the key is a JS to download another js,document.write to the document, and then repeat 2 times so work.
Weak weakly asked: Why not like Baidu to provide bulk submission portal?
Is it, relying on this automatic submission function, collects the data of the website, such as Document.refer? This is the comparison rogue, right?
It is said that 360 of the search engine currently in the Chinese market share of more than 20%, do not know true and false, I am very skeptical!
At least I basically only use Google! But in the celestial or basic with Baidu, small white or too much!
Have to endure, plus 360 automatic collection bar!
So the code is modified!
The original code of the official website is as follows:
<script> (function () {
var src = (document.location.protocol = = "http:")? " http://js.passport.qihucdn.com/11.0.1.js?970506d365e969bd0e92a2611c18678e ":" https://jspassport.ssl.qhimg.com/ 11.0.1.js?970506d365e969bd0e92a2611c18678e ";
document.write (' <script src= ' + src + ' "id=" Sozz "><\/script>");
})();
http://js.passport.qihucdn.com/11.0.1.js?970506d365e969bd0e92a2611c18678e
document.write (' <script charset= "Utf-8" src= "Http://s7.qhres.com/static/ab77b6ea7f3fbf79.js" ></script > ')
Http://s7.qhres.com/static/ab77b6ea7f3fbf79.js
The code provided by the official website has entered the code of two Times Square document.write as follows, this JS code is as follows:
(function (e) {
function T (e) {
var t = location.href, n = T.split (""). Reverse (), R = E.split (""), i = [];
for (var s = 0, o = +; s < o; s++) I.push (R[s] + (N[s] | | ""));
Return I.join ("")
}
var n =/([http|https]:\/\/[a-za-z0-9\_\.] +\.so\.com)/gi, r = e.location.href;
if (R &&!n.test (r) && Window.navigator.appName) {
var i = "//s.360.cn/so/zz.gif", S = document.getElementById ("Sozz"), O = S.src.split ("?") [1], u = t (o), a = new Image;
R && (i + = "url=" + encodeURIComponent (r)), O && (i + = "&sid=" + O), u && (i + = "&token=" + u), o && (a.src = i)
}
}) (window);
Analysis Discovery
The ultimate goal or IMG request submission, and then, the transformation is as follows:
Under the phpcms/libs/functions/directory of Phpcms V9, locate the extention.func.php file and add the following code:
/**
* 360 push @www. zhoulujun.cn
*/
function Getpushsourl ($url) {
$token = "970506d365e969bd0e92a2611c18678e";
return $str = "Http://s.360.cn/so/zz.gif?url=". UrlEncode ($url). " &sid= ". $token. " &token= ". Getpushtoken ($url, $token);
}
function Getpushtoken ($url, $o) {
$n = Str_split ($url, 1);
$n =array_reverse ($n);
$r = Str_split ($o, 1);
$i =[];
For ($s =0, $o =16; $s < $o; $s + +)
{
Array_push ($i, empty ($n [$s])? $r [$s]: $r [$s]. $n [$s]);
}
Return implode ($i);
}
/*
Class push_so_url{
Private $token = "970506d365e969bd0e92a2611c18678e";
Public Function Settoken ($token) {
$this->token= $token;
}
function __construct ($token) {
$this->token= $token;
// }
Public Function Getpushtoken ($url, $o) {
$n = Str_split ($url, 1);
$n =array_reverse ($n);
$r = Str_split ($o, 1);
$i =[];
For ($s =0, $o =16; $s < $o; $s + +)
{
Array_push ($i, empty ($n [$s])? $r [$s]: $r [$s]. $n [$s]);
}
Return implode ($i);
}
Public Function Getimgurl ($url) {
return $str = "Http://s.360.cn/so/zz.gif?url=". UrlEncode ($url). " &sid= ". $this->token. " &token= ". $this->getpushtoken ($url, $this->token);
}
}
*/
Add the following code to the template phpcms/templates/default/content/such as show index:
Okay, verify under
And JS effect is the same.
Manual, do not know how the official attitude to this program, has not received a reply, mailed to the official sent by mail and forum, know all questions, nobody.
Let's do it first!
Reprint please indicate source:
Zhou Lujun's personal website-360 search engine so automatically ingest PHP rewrite scheme-for phpcms and other CMS
Http://www.zhoulujun.cn/zhoulujun/html/Operation/seo/2018_0426_8102.html
?
360 search engine so automatically ingest PHP rewrite solution-for phpcms and other CMS