Home>Article>Backend Development> How to make 360 search engine include php rewriting method

How to make 360 search engine include php rewriting method

php中世界最好的语言
php中世界最好的语言 Original
2018-05-16 11:54:39 2172browse

This time I will bring you how to let 360 search engine include the php rewriting method, and let 360 search engine include the php rewritingmethod. What are the precautions? The following is a practical case, let's take a look.

360 search engine automatically includes the function. The official code is provided in a tape format, which is very cheating. It does not provide a batch submission entrance, but only provides a piece of js code. The key is to use one js to download another js, document.write Go to the document and repeat the process 2 more times.

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:

')

The code provided by the official website has entered the quadratic document.write code as follows. The code of this js 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, add the following code to show index:

okay, verify that the effect of

and js is the same.

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

Detailed explanation of the steps for PHP to use file_get_contents to send http requests

PHP implements random elimination algorithm

The above is the detailed content of How to make 360 search engine include php rewriting method. 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