360 search engine automatically records php rewriting scheme

  • 2021-09-24 21:32:25
  • OfStack

360 search engine automatic recording function, officially provided code, tape, 10 points, did not provide batch submission entrance, only provided one js code, the key is one js to download another js, document. write to the document, and then repeat this work twice.

Weakly ask: Why not provide batch submission portal like Baidu 1?

Is it, rely on this automatic submission function to collect website data, such as document. refer and other data? This is also a rogue, isn't it?

It is said that 360 search engine market share in China at present is more than 20%, do not know true or false, I am 10 points doubtful!

At least I basically only use Google! However, Baidu is basically used in China, and there are still too many small white!

Had to endure, add 360 automatic inclusion!

So the code for a transformation!

The original code of 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>')

The code provided by official website has entered the second power document. The code of write is as follows, and the code of js is as follows:


/**
 * 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:


<img src="{getPushSoUrl($_SERVER['HTTP_HOST'].$url)}">

okay, under verification

The effect of js is the same as that of js.

After work, I don't know the official attitude towards this plan. I haven't received a reply yet. I sent it to the official by mail and forum. Zhihu asked questions and no one asked.
Let's do it first!


Related articles: