Frequently asked questions about the Random Text script.
Edit the text data file, one quote per line.
The Random Text script reads from a simple text file with one entry per line:
The only way to do great work is to love what you do. - Steve Jobs
In the middle of difficulty lies opportunity. - Albert Einstein
Life is what happens when you're busy making other plans. - John Lennon
The future belongs to those who believe in the beauty of their dreams. - Eleanor Roosevelt
Yes.
You can include HTML tags in your text lines. They will be output as-is:
<b>Bold quote</b> - Author Name
<i>Italic quote</i> - Another Author
<font color="red">Colored quote</font> - Third Author
<a href="http://example.com">Click here</a> for more info
Use SSI or call the script directly.
There are several methods to display random text that changes on each page load:
<!--#include virtual="/cgi-bin/rand_text.cgi"-->
Executes the script on each page load. Requires SSI enabled on your server.
<iframe src="/cgi-bin/rand_text.cgi"></iframe>
Embeds the output in an iframe.
rand_text.cgi?v=1766155801
Yes, use different data files.
You can have different sets of random text for different purposes:
# quotes.txt - inspirational quotes
# tips.txt - daily tips
# news.txt - company news
# taglines.txt - marketing taglines
Pass the filename as a parameter:
<!--#include virtual="/cgi-bin/rand_text.cgi?file=quotes"-->
<!--#include virtual="/cgi-bin/rand_text.cgi?file=tips"-->
Questions about random links
Questions about random images
Browse all script FAQs