Tell me how to write a script in php, so that it sends to the search engine servers to attract bots to the site to increase the site indexing? Actually, perform a ping with a post request to the rcp server, say yandex. So that Yandex has indexed the site page? There is an example, but the 4th line swearing to go!

<?php function file_open($url,$post) { $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS,$post); $get_row_urlink = curl_exec($ch); curl_close($ch); return $get_row_urlink; } $xml = <<<EOL <?xml version="1.0" encoding="UTF-8"?> <methodCall> <methodName>weblogUpdates.[anchor=http://Мой сайт.ru|Ping pingomatic.com services with PHP]ping[/anchor]</methodName> <params> <param> <value>заголовок</value> </param> <param> <value>http://clubs.ya.ru/company/rss/posts.xml</value> </param> </params> </methodCall> EOL; $result = file_open("http://ping.blogs.yandex.ru/RPC2",$xml); echo $result; // просто для того что бы увидеть ответ сервера ?> 
  • Register the site in the Google Search Console and Yandex.Webmaster , configure the sitemap.xml file and preferably robots.txt. You don’t need to ping anything, you don’t need to write any code either. Search engines will decide when to index your site. Where did you even read about it? - neluzhin
  • I did not read This is WP! - Helpsetup
  • There are programs that ping RPC servers and servers a lot of about 500 pieces. And WP is a plugin! Yes, they come but not as fast as they wanted! The PingExpert program seems to be the name! Do you want to expand your knowledge? Did not know what is there? I did not come here to discuss this particular code ?! - Helpsetup
  • one
    ругань идеть! - what is the abuse? You can give the text of the error, maybe you do not have cURL in php - Crantisz
  • @Crantisz is not possible, but definitely not. - Zhukov Roman

0