Google Base

5 posts by 2 authors in: Forums > CMS Builder
Last Post: January 18, 2010   (RSS)

By richc - January 18, 2010

Has anyone used Google Base to submit real estate feeds to Google Maps?

See http://maps.google.com.au/help/maps/realestate/data_provider_faq.html

Basically need to create an XML file and either have it updated daily or triggered to update when a new listing is added.

Thanks!

Re: [chris] Google Base

By richc - January 18, 2010

Thanks Chris

It seems that I have to actually write that output to a separate XML file - strangely Google doesn't seem to accept a php file as the input.

Re: [richc] Google Base

By Chris - January 18, 2010

Hi richc,

You can use PHP to generate an XML file. If your Content-type is correct (set by the first line in the sample above) and the XML is well-formed, the only difference between a static XML file and your PHP file (from the XML consumer's perspective) will be the URL (e.g. http://example.com/example.xml vs. http://example.com/example.xml.php). XML consumers tend not to be concerned with what URLs look like, instead focusing on Content-type headers. People do this all the time, serving dynamically-generated XML files from PHP.

If you want to test this out, get an example.xml file working, then rename it example.xml.php, prepend the <?php header('Content-type...') ?> line above, and make sure that works.

If this actually does turn out to be a problem (which I doubt), you might be able to trick your web server into serving your PHP script from a URL which mimics a static XML file (e.g. http://example.com/example.xml). Only after you've exhasted these approaches would I recommend publishing a separate, static XML file, as this would require either a cron job or human intervention to keep updated, as well as requiring some custom programming to write.

I hope this helps. Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Google Base

By richc - January 18, 2010

Thanks for the quick response Chris!

I'm already using that method ( eg rss.xml.php) successfully for rss feeds and google map input ... my site is www.hawkes-bay.co.nz

Strangely though Google base seems to specify that an xml extension must be used - see http://base.google.com/support/bin/answer.py?answer=59542&hl=en_GB

However I will try to register a .php datafeed and see what happens...