GetSimple Support Forum
how to enable ping search engine Yandex - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: how to enable ping search engine Yandex (/showthread.php?tid=4283)



how to enable ping search engine Yandex - Oleg06 - 2013-02-10

how to enable ping search engine Yandex?
Code:
$yandex ='www.yandex.ru';
      if( $fp=@fsockopen($yandex, 80) ) {
      $req =  'GET /webmaster.yandex.ru/ping?sitemap=' .
              urlencode( $url_xml ) . " HTTP/1.1\r\n" .
              "Host: $yandex\r\n" .
              "User-Agent: Mozilla/5.0 (compatible; " .
              PHP_OS . ") PHP/" . PHP_VERSION . "\r\n" .
              "Connection: Close\r\n\r\n";
      fwrite( $fp, $req );
      while( !feof($fp) ) {
         if( @preg_match('~^HTTP/\d\.\d (\d+)~i', fgets($fp, 128), $m) ) {
            $status = intval( $m[1] );
            break;
         }
      }
      fclose( $fp );
   }



RE: how to enable ping search engine Yandex - Oleg06 - 2013-02-10

??????


RE: how to enable ping search engine Yandex - shawn_a - 2013-02-11

wtf is a yandex ?


RE: how to enable ping search engine Yandex - mvlcek - 2013-02-11

(2013-02-11, 02:28:56)shawn_a Wrote: wtf is a yandex ?

4th largest search engine, larger than Microsoft's Bing!