jballard Posted November 14, 2003 Posted November 14, 2003 What does this CGI Script do? Are there any instructions on using it (if needed once one understands what it does)? Quote
TCH-Don Posted November 14, 2003 Posted November 14, 2003 From the cpanel documentation: This simple script allows you to insert random pieces of text into your web page. This is useful for daily quotes, helpful hints, or any other place where random text is useful. To install the Random HTML script: Click on the on the Random HTML link in the CGI Center area. Enter each piece of random text in the box and make sure you put each piece of text on a new line. You can not include new paragraphs within the one piece of text, as the script will separate each new paragraph into a new piece of text. Copy and paste the tag at the top of the page into your web page at the appropriate place. Change your web page extension from .htm or .html to .shtml. This is the required file extension to use SSI (Server Side Includes). Click on the Save button. Upload the web page and test the script. Quote
jballard Posted November 14, 2003 Author Posted November 14, 2003 Good, I'll try it! Now, if I want to change the list of text lines .. are they stashed where they would be editable ... or do you just repeat the process with your new list each time? And are the text items text only (no html tags, etc.)? Thumbs Up Quote
TCH-Don Posted November 14, 2003 Posted November 14, 2003 (edited) When you go back into cpanel the list is still there and you can change them there. edit. I added an html image tag into the list of text quotes and it worked! Edited November 14, 2003 by TCH-Don Quote
jballard Posted November 18, 2003 Author Posted November 18, 2003 OK, I must be having a lapse of brain function ... I haven't been able to make this work. Does the tag line have to reside within the html body? Does it have to be wrapped in something like img src ... Do you paste it in literally like it is presented: <!--#exec cmd="cgi-bin/randhtml.cgi"--> or some "edited" version of the line? Does the shtml file have to live in a particular folder ... Duh? Quote
TCH-Don Posted November 18, 2003 Posted November 18, 2003 (edited) I just inserted it as html and it worked. Put it where ever you want it displayed. ><H1>random html gen test</H1> <P> <!--#exec cmd="cgi-bin/randhtml.cgi"--> </P> edit Ok I did put it in the root folder and it worked, but not in a sub folder. I will see what I can find out. Edited November 18, 2003 by TCH-Don Quote
jballard Posted November 18, 2003 Author Posted November 18, 2003 OK .... saw your comment about the root dir ... let me know ... THANKS! ________ OK It looks like I would want my shtml file in a folder containing a cgi-bin folder containing the randhtml.cgi file. Or am I making this too difficult? If not where is the randhtml.cgi file created ... just copy the corresponding cgi-bin folder where I want it, or am I off in the weeds?? Quote
TCH-Don Posted November 18, 2003 Posted November 18, 2003 The random.cgi file is created in you cgi-bin folder below your root folder. You can see it there Quote
TCH-Don Posted November 18, 2003 Posted November 18, 2003 Well you can put the shtml file into the cgi-bin and run it drop the cgibin/ <H1>random html gen test</H1> <P> <!--#exec cmd="randhtml.cgi"--> </P> I did try to put the cgi file in a subdomain cgi-bin and nothing. Hope that helps. I would look for php version. Quote
jballard Posted November 18, 2003 Author Posted November 18, 2003 I played with it a bit more ... never did get it to display a text line. And if you move the .randhtml file, then when you go back to the Cpanel edit/control, it doesn't see what you had saved before, etc. and will just create another file in the root folder. Oh, well .... Thanks for your help! Jeff Quote
TCH-Don Posted November 18, 2003 Posted November 18, 2003 No problem, I think it would be easier to use a php script. I am sure hot scripts will have one like this www.hotscripts.com/Detailed/17031.html have fun! Quote
jballard Posted November 19, 2003 Author Posted November 19, 2003 Thanks for the referral to www.hotscripts.com, what a great resource! I ended up at www.cgiscript.net and found a short Javascript piece that did the trick ... had it up and functioning in minutes. (Did I mention that there is another ton of stuff on this site!) Also, for another blog, I wanted a Quote of the Day item ... not one that I populated, but that would draw from a QOTD site on the net. I found Best Quote of the Day at http://home.att.net/~quotations/. Another short Javascript piece that pulls up a daily quote. ... plug and play! Jeff Quote
TCH-Don Posted November 19, 2003 Posted November 19, 2003 You are welcome, its a great resource. glad you have one working. Thumbs Up Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.