Question

I've used Wordpress's plugin that notifies a few search engines every time you make a new post. However i'm thinking of developing a website that users submit stuff to, how can i use PHP to notify Google with an XML sitemap (or similar method) of the site changes as and when they happen, so users submissions are searchable/indexed quickly by Google.

Was it helpful?

OTHER TIPS

shell_exec('ping -c1 www.google.com/webmasters/sitemaps/ping?sitemap=http://www.website.com/sitemap.php');

Issue your request to the following URL: www.google.com/webmasters/tools/ping?sitemap=sitemap_url Issue the HTTP request using wget, curl, or another mechanism of your choosing. A successful request will return an HTTP 200 response code, if you receive a different response, you should resubmit your request.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top