xtranophilst Posted July 27, 2009 Share Posted July 27, 2009 I want to write a PHP script that just pings the following two links, just send a request whenever the PHP script is executed: [so that my sitemaps will be notified to the search engines] http://submissions.ask.com/ping?sitemap=http://www.mysite.com/sitemap_index.xml http://www.bing.com/webmaster/ping.aspx?siteMap=http://www.mysite.com/sitemap_index.xml Just wanted to complete the request of these two queries. I did it with javascript form submission. But how can i do it in simplest way in PHP? Thanks in advance. Regards. Link to comment https://forums.phpfreaks.com/topic/167644-php-script-for-pinging/ Share on other sites More sharing options...
Alex Posted July 27, 2009 Share Posted July 27, 2009 You can use file_get_contents() or cURL. Since you're not posting data file_get_contents() will work fine. ex: $var = file_get_contents('http://submissions.ask.com/ping?sitemap=http://www.mysite.com/sitemap_index.xml'); Link to comment https://forums.phpfreaks.com/topic/167644-php-script-for-pinging/#findComment-884101 Share on other sites More sharing options...
xtranophilst Posted July 28, 2009 Author Share Posted July 28, 2009 Thanks a lot. Link to comment https://forums.phpfreaks.com/topic/167644-php-script-for-pinging/#findComment-884591 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.