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. Quote 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'); Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/167644-php-script-for-pinging/#findComment-884591 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.