View Full Version : Google Sitemap
CyberGrenade
07-06-2006, 04:38 PM
I wanted a way to create a Google site map for my Directory. I wanted a script that would generate it. Here is the script that I have created if anyone is interested. This was created to work with v2.0. I don't have version 3 yet, so let me know if it works with 3. It should if the config file has not changed.
Copy the file to your root Directory and name it something like sitemap.php
Content visible to registered users only.
This code will generate a file called sitemap.xml. I have run it on my site, and it generates a .xml file that was accepted by Google. It currently will only generate the sitemap three levels deep.
Root Categories
--- Sub Categories
------ Sub Categories
For more information on Google Sitemaps:
http://groups.google.com/group/google-sitemaps
http://www.google.com/support/webmasters/bin/topic.py?topic=8467
If you use this script, please show your support by adding your site to my directory. http://www.cybergrenade.com
Thanks, and comments are always welcome.
vegabond
07-06-2006, 05:21 PM
Thanks for your contribution :D. v3.05 have a built in function for building Sitemap.
Parse error: syntax error, unexpected T_STRING in /home/.beechnut/xxxxx/xdmoz.com/sitemap.php on line 34
why?
saadahmed007
07-25-2006, 11:40 PM
Same error here???
Why?
eventually i'll get around to writing something that creates a sitemap.xml file of sitemap xml files. I need it for the 2.6 mil category site.
hprlink
09-04-2006, 03:25 PM
Parse error: parse error, unexpected T_STRING in /home/www/hprlink.com/sitemap.php5 on line 25
why ?? I disregarded that line then the same wrong appeared at line 57 ..
a sitemap.xml has been generated but has some errors like :
XML Parsing Error: junk after document element
Location: http://www.hprlink.com/sitemap.xml
Line Number 7, Column 3: <url>
--^
promotemydomain.com
09-18-2006, 12:06 AM
I was having the same problems that everyone else was having but I believe that i have come up with a solutions to everyones problems:
I made it go 5 levels deep too :)
Content visible to registered users only.
Best Regards,
Evan
hprlink
09-18-2006, 09:59 AM
ok .... thank you
it worked very well !!
promotemydomain.com give me the url of your site & category for adding as featured link in www.hprlink.com ...
Blastom
09-20-2006, 09:16 PM
Wow, I used it a I got a 224 Mb xml file. Is it really my sitemap? Anyway, I have submitted my directory to yours.
Blastom
09-20-2006, 09:23 PM
and it's not even good, cause betwenn .com and the first category, there is no slash.
It like example.comAccesories/
promotemydomain.com
09-20-2006, 09:50 PM
If I were you I would break it down into 10 mb sections, and then add a google sitemap index. This is what google requires anyway, and if you look at the googles site for sitemaps, it is right on the money as they like it. You must have quite a few pages to have a 224 mb sitemap as mine is less that 20 mb. I bet that the size has to do with your tag clouds
Hope it works for ya, doing a good job for me with no errors as per google.
Best Regards,
Evan
promotemydomain.com
09-20-2006, 09:53 PM
Content visible to registered users only.
You need to set up your directory so that in the admin it says: http:www.example.com/ instead of http://www.example.com
This should fix your problem
Evan
promotemydomain.com
09-20-2006, 09:55 PM
Content visible to registered users only.
I did not receive your submission? I bet you sent the info to the directory that is listed as I just tweaked it to work, but I left the original persons informaition in the code.
If you want to submit to my directory, please see the information below in my sig.
Evan
proprod
09-21-2006, 01:39 AM
Content visible to registered users only.
224MB? My sitemap generator does all levels and I have 1300+ cats, and 3200 links, my sitemap with all levels is 1.1MB Something doesn't sound right if it's 224MB, is this for green corner?
Blastom
09-22-2006, 06:31 PM
Well, I thank you for your posts.
Content visible to registered users only.
Content visible to registered users only.
I think you are both right.
Sorry promotemydomain, I thought you stated the thread :). I'll submit to you now. :)
Blastom
09-22-2006, 06:38 PM
I could get out the clouds, make the site map , and than put them back? What to do think? By the way, you can check out My Tommy, if your directories are new.
Blastom
09-24-2006, 11:12 AM
Well, I did just that, and I got a 11Mb sitemap. I have downloaded tho look at it. The odd thing is that i get thigs like this http://www.mygreencorner.com/Accesories/Chemicals/Fertilizer/Fertilizer/Fertilizer/
or like this http://www.mygreencorner.com/Computers_and_Internet/World_Wide_Web/Forums/JavaScript/Searching_the_Web/
and this category I don't have :)
Any idea of what's going on?:)
gearoid
10-09-2006, 08:08 PM
Yes Blastom,
Same here with the distorted/weird urls, when using promotemydomain.com script, though it may not be the fault of the script, necessarily.
Cybergrenades doesn't go deep enough.
Oh well.
shadav
02-27-2007, 06:02 PM
sorry for bumping an old topic, but it sounded good :)
i tried the original code and i got the same error as everyone...
I then tried promotemydomain.com's code and it said the sitemap was generated but I can't find it...when i clicked on the words sitemap generated it took me to my index page but had /sitemap.xml after it.....
SasaVtec
02-27-2007, 06:40 PM
If you have 3.+ then there is an auto sitemap generator for google and yahoo.
gesugefu
02-27-2007, 08:08 PM
the best way to generate a gxxgle sitemap, yahoo sitemap or whatever you want, with all sites include is the GSiteCrawler Programm. it's freeware
Ndoki53
06-20-2007, 03:52 PM
Take a look at XML Sitemap Generator. I use it to generate Google and Yahoo sitemaps as well as html sitemaps for all of my websites. I think it is more robust than the PHPLD 3.2 sitemap generator. See signature.
James
06-20-2007, 04:03 PM
http://www.xml-sitemaps.com/
looks ok ...
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.