Home >Backend Development >PHP Tutorial >360 search engine automatically includes PHP rewriting solution PHP examples

360 search engine automatically includes PHP rewriting solution PHP examples

jacklove
jackloveOriginal
2018-06-26 17:03:442335browse

This article mainly introduces the relevant information of 360 search engine’s automatic inclusion of PHP rewriting plan. Friends who need it can refer to

360 search engine’s automatic inclusion function. The official code is provided in a tape format, which is very cheating. , does not provide a batch submission entrance, but only provides a piece of js code. The key is that one js downloads another js, document.write to the document, and then repeats the same process twice.

Weak question: Why not provide a batch submission entrance like Baidu?

Could it be that this automatic submission function is used to collect website data, such as document.refer and other data? Isn't this one more rogue?

It is said that 360’s search engine currently has a market share of more than 20% in China. I don’t know whether it is true or not, but I am very skeptical!

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

I have no choice but to endure it and add 360’s automatic inclusion!

So we made some changes to the code!

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(&#39;<script src="&#39; + src + &#39;" id="sozz"><\/script>&#39;);
})();
http://js.passport.qihucdn.com/11.0.1.js?970506d365e969bd0e92a2611c18678e
document.write(&#39;<script charset="utf-8" src="http://s7.qhres.com/static/ab77b6ea7f3fbf79.js"></script>&#39;)

The code provided by the official website has entered the quadratic document.write code as follows, this js The code is as follows:

/**
 * 360推送 @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);
  }
 
 
}
*/

In the template phpcms/templates/default/content/, for example, show index, add the following code:

d232dc990f3fa21a0d50aa03f4bf24b0

Related recommendations:

Detailed explanation of php and ethereum client interaction php examples

PHP cURL Get WeChat public account Example of access_token php example

PHP implements the turntable lottery algorithm sharing php example


The above is the detailed content of 360 search engine automatically includes PHP rewriting solution PHP examples. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn