Skip to content
Snippets Groups Projects
Commit 20b335b5 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

automatic google ping after sitemap update

darcs-hash:20051129223742-7ad00-2b17207795c195d7194578007ef19029f0ed0f94.gz
parent ce268366
No related branches found
No related tags found
No related merge requests found
......@@ -20,10 +20,6 @@ sendGIF();
// - probably not needed but better safe...
ob_start();
// Now start work
require_once(DOKU_INC.'inc/utf8.php');
require_once(DOKU_INC.'inc/auth.php');
// run one of the jobs
runIndexer() or runSitemapper();
......@@ -121,7 +117,15 @@ function runSitemapper(){
$data = ob_get_contents();
ob_end_clean();
//save the new sitemap
io_saveFile($sitemap,$data);
//ping google
$url = 'http://www.google.com/webmasters/sitemaps/ping?sitemap=';
$url .= urlencode(DOKU_URL.$sitemap);
$http = new DokuHTTPClient();
$http->get($url);
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment