
150 GOOGLE APPS HACKS
As you can see in these example functions, the returned image URL is an absolute URL; that’s
because even though the XML is initially hosted on your server, it will later be served by Google
through the gmodules.com domain.
In order to have your script be recognized by your web server as a PHP script, you will probably need
to give it a lename such as product-gadget.php. If you are using the Apache server with mod_rewrite
enabled, you can make it look like an XML le by using syntax like the following inside an .htaccess
le on your server:
RewriteEngine On
RewriteRule ^product-gadget\.xml product-gadget.php
This would let you use a URL like http://example.com/product-gadget.xml. Your gadget is now
ready to be submitted at http://google.com/ig/submit!
Note that an alternative to this approach is to have your product image script emit an RSS/Atom feed, as
iGoogle users can also add any feed as a gadget. This way, you would also support RSS readers, RSS-enabled
screensavers, and mobile devices that support RSS.
HaCK 61:
Is the plain white background of the Google home page boring you?
When you click the Select Theme link at iGoogle.com, you are forwarded to the themes directory to
pick one of the many available looks for your Google home page. You’ll nd choices like Lollipopland,
Hong Kong (pictured in Figure 6-10), or Darts. Some of the themes ...