360 search engine so automatically ingest PHP rewrite solution-for phpcms and other CMS

Source: Internet
Author: User
Tags urlencode

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 ";d ocument.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

(function  (e)  {    function t (e)  {         var t = location.href, n = t.split (""). Reverse (),  r =  e.split (""), i = [];        for  (var s  = 0, o = 16; 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) {       &nbsp, $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&nBsp;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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.