Random Quote Generator

Do you like the random quotes you see on my website? Would you like to add my random quote generator to your site? You can do so in a number of ways:

  • As a JavaScript include (easiest method):
    Paste the following text into your html:


    <script language="Javascript" src="http://quotes.rationalmind.net/random.php?format=js;">
    </script>

  • As XML: Use this URL:
    http://quotes.rationalmind.net/random.php?format=xml
  • As PHP code:


    < ?php
    include("http://quotes.rationalmind.net/random.php");
    ?>

  • As text (when screen scraping): http://quotes.rationalmind.net/random.php
  • Google Gadget: http://quotes.rationalmind.net/random.php?format=gadget

If you want to submit your own quotes, you can browse the full list and add new quotes. (New quotes will not appear until I approve them.)

If you want to limit the quotes to a specific author, add ?author=Authors Name to the URL. You can combine this with the format. For example:
http://quotes.rationalmind.net/random.php?author=Ayn Rand&format=js
(To filter by topic, use ?keyword=KeyWord )

If you want to view all quotes from a single author:
http://quotes.rationalmind.net/random.php?show_author=Ayn Rand

One Response to Random Quote Generator

  1. heena trivedi

    hi david,

    i am trying to put the XML link to my page but i find an error in your XML file,
    the error is something like,
    This page contains the following errors:

    error on line 2 at column 6: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.

    that’s why i can’t put the link of your XML file.
    I found many good quotes in your quote generator so I just inform you…. through this reply (comment)

Leave a Reply

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