Technical
Want to add a random quote to your website (like the quote found near the bottom of this site's home page)?
We have been collecting these quotes since 1991.
They represent the funny, thoughtful, or even disturbing words found in books, comics, movies, songs, or everyday conversations.
We welcome your contributions to our ever-growing database of quotes!
Would you like to have our random quotes appear on your website?
The easiest way to show these quotes on your webpage is to insert the following code in your page's HTML:
<iframe src="http://www.moorecompdev.com/quotes/RandomQuote.asp" border=0 width="100%" ></iframe>
This will give you the quotes, but will not let you set the colors or other formatting.
Use the following ASP block to get quotes data from our database for use on your website. Contact us if you need examples in other web programming languages or help formatting the output for your website.
If you have any questions or comments about the code below, please let us know and we'll try to help you.
Also, if you intend to link to our quotes, please let us know in the forums.
<!-- Begin Random Quote Code -->
<%
Dim objRanQuoteXmlHttp
Dim strRanQuoteResponse
dim strRanQuoteLine
dim strRanQuoteUrl
strRanQuoteUrl = "http://www.moorecompdev.com/quotes/RandomQuote.asp"
Set objRanQuoteXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objRanQuoteXmlHttp.open "POST", strRanQuoteUrl, False
objRanQuoteXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objRanQuoteXmlHttp.send 'Send quote request.
strRanQuoteResponse = split(objRanQuoteXmlHttp.responseText, vblf) ' This now holds the entire quote
Set objRanQuoteXmlHttp = Nothing
for each strRantQuoteLine in strRanQuoteResponse
'Output each line of the quote to the screen.
response.write strRantQuoteLine
next
'instead of 1 line at a time. You can also output the entire quote at once by using: response.write strRanQuoteResponse
%>
<!-- End Random Quote Code -->
- Technical
- Random Quotes - 9/5/2009 charles
- Services Offered - 9/4/2009 charles
[Return to Refering Page]
Subscribe to MCD Latest News
News Alerts
Receive late breaking news alerts in your email in-box as soon as articles are posted. You must be a registered user to subscribe.
Available Categories
