Made this recently and I figured this might be easy for some of you. Just upload the script to your server only edit the sitemap url and attach it to a cronjob that works like 1 time every day. It submits to google, bing, yahoo and ask. <?php $sm_url = "http://mydomainname.extension/sitemap.xml"; $se_list = array("http://www.google.com/webmasters/sitemaps/ping?sitemap=", "http://www.bing.com/webmaster/ping.aspx?siteMap=", "http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=YahooDemo&url=", "http://submissions.ask.com/ping?sitemap="); foreach($se_list as $i){ $url_to_ping = $i . $sm_url; if ($i == "http://www.google.com/webmasters/sitemaps/ping?sitemap=") { $host = "Google"; } elseif ($i == "http://www.bing.com/webmaster/ping.aspx?siteMap=") { $host = "Bing"; } elseif ($i == "http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=YahooDemo&url=") { $host = "Yahoo"; } else { $host = "Ask"; } $data = file_get_contents($url_to_ping); if ($data) { // do something if succeeded } else { // do something if failed, like mail yourself of a submit failure to specific $host } } ?> PHP:
The search engines cache the sitemap address practically forever. Pinging every day is completely pointless.