For additional details about the curl library, check out http://www.zend.com/manual/function.curl-getinfo.php, http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html and http://www.die.net/doc/linux/man/man3/curl_easy_getinfo.3.html
Once you have your sitemap stored inside an xml file, don't forget to submit it to Google.