When I followed the link from "Just copy this code into a php file" I received: Invalid at the top level of the document. Error processing resource 'http://www.socialpatterns.com/wp-content/googlesitemap... <?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>--------------------------------------------------^ Code (markup):
NP. $connection=mysql_connect($baza_adres,$baza_login,$baza_pass); $db = mysql_select_db($baza_baza); $plik=fopen("sitemap.xml","w"); flock($plik,2); fputs($plik,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); fputs($plik,"<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\">\n"); $w1=mysql_query("SELECT * FROM artykuly WHERE status='1' ORDER BY 'czas' DESC") or die ("Invalid query 1"); while($r1 = mysql_fetch_array($w1)) { $skrot=$r1['skrot']; $linia="<url>\n"; $linia.="<loc>http://www.domain.com/index.php?art=$skrot</loc>\n"; $linia.="<changefreq>daily</changefreq>\n"; $linia.="</url>\n"; fputs($plik,$linia); } fputs($plik,"</urlset>\n"); flock($plik,3); fclose($plik); mysql_close($connection); Of course it's just an example...
Do you have to install python first? I can't find any documentation in installing and running the script. Some pointers maybe?
Yeah, I've been reading the G sitemap docs for the past 45 min, got real excited until realized that my sorry virtual host (godaddy) for this particular site of mine doesn't allow cron jobs, so no python runs. You ask, why did I chose godaddy for this site? An incentive from godaddy for all my URL registrations. Stupid me, and starting day before yesterday, godaddy had a major slowdown on their linux virtual hosting servers... lasted 36 hours. Here I go, blathering on about godaddy, sorry for trying to hijack this thread.
If the server doesn't have python you could run it in your local computer, just need the url's on the text file. ( I think I'm right on this ones). I think a good way is to create a script to crawl your site and dump all the urls in the text file, then run the python script to create the sitemap fron the text file. Is there a crawler that does this already?
I wish I was better at php I just had an idea (maybe a nice php programmer around here will do it and release it): Modify the create new tread in VB/ PHPBB/ etc, when a new tread is created automatically add it to the .txt file with the url list (posibly add the link at the top). then run the python script via a cron job so G can easily get new treads...
Mine is submitted 54 minutes ago and downloaded 44 minutes ago. So I don't see any problems with google at the moment. What I did see at one point was a status page telling me that my page was submitted half an hour ago and download was pending. And as my current results show that the page was downloaded 10 minutes after submittion that tells me the stat page isn't instant but will be updated every so often. It works for me anyway. Else there is also the resubmit button which you could try to get Google there attention. Now on to make one for my other websites.
I manually submitted a list or URLs one hour ago, which was just downloaded by google. Here is how 1. Using a text editor, create a file with your URLs, one URL per line, save it to disk with a name of your choice; e.g, mysite.urls contents of mysite.urls will look something like this; http://www.mysite.com/index.html http://www.mysite.com/links.html http://www.mysite.com/contact.html . . . . 2. ftp this file to the root of your server; e.g., http://www.mysite.com/mysite.urls 3) copy / paste the file's path into the address line of your browser to make sure the url is accessible (no robots.txt blockage, permission problems, etc.) 4) add the url of the sitemap by entering it into the textbox at http://www.google.com/webmasters/sitemaps/showaddsitemap wait for approval.
That's fairly easy to do for small sites, but when you have a few thousand dynamically created urls, that's not too feasable. Nonetheless, thanks for the tip.
"fairly easy to do for small sites" true, but it works for now, since I can't run a cron job with my current (godaddy) host. but, it did serve to upload a goodly number of page URLs.
Great info pcdoc - thanks. It must be pretty popular... I keep trying to get to that page, but I keep getting a 502 server error. Bet they're getting swamped.
Oh, they've been slashdotted, digitalpointed, wired, you name it, everyone's going to have a story/discussion about it.