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.
To ping Google, the ping url is:
http://www.google.com/webmasters/sitemaps/ping?sitemap=http://www.yoursite.com/sitemap-file.xml