Gmail Random Signature Quote in PHP

Feb. 26, 2010

Google has removed the Random Signature option from Labs this week. The feature is not longer supported. The links below can be used to supply a RSS feed to your website or iGoogle page.

May 20, 2009

Updated both quotes.php and inspirational_feed.php to encode text to fix reported issue. Also upated the example code.

May 6, 2009

I have created a new inspirational quote feed. Here is the link:
http://www.wadesword.org/RSS/Quotes/inspirational_feed.php

You can use this with your Gmail random signature (as described below), Google homepage, or in any other RSS feed reader.

Enjoy!

Dec, 2008

I rewrote my ASP script in PHP, so it can be hosted on this website (full source code below). If you are using my Gmail random signature please update Gmail to use this one:

http://www.wadesword.org/RSS/Quotes/quotes.php

The feed above is viewable in Firefox and Safari, but not IE.

The code grabs 10 random quotes from a file with about 300 quotes and tries to create ten RSS feed items. Gmail currently has a limit of 96 characters, so the code ignores any quotes that will be over 96 characters. This currently averages between five to seven good quotes.

Once you add this to Gmail, you have to compose an email, discard that email, then compose another one, before the quote will show up on the bottom of the  new email.

Gmail Random Quote as the Signature
Gmail Random Quote as the Signature

Here is the default quote feed that Gmail uses, in case you would like to switch back:

http://www.brainyquote.com/link/quotefu.rss

Source Code

Example code can be found here:

http://www.wadesword.org/RSS/Quotes/RssQuotesPHP.zip

Here is the example code running on my server:

http://www.wadesword.org/RSS/Quotes/feed_sample.php

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

14 thoughts on “Gmail Random Signature Quote in PHP”