Jump to content

Recommended Posts

Posted

I´ve decided to do some cleaning up in my cgi-bin but I dont remember what files were installed there originally (if any) when I signed up with TCH. Figured I dont wanna ruin something, so I better ask. :)

Posted

Just out of curiousity...

What does this script "randhtml.cgi" do? Which I by the way havent placed in cgi-bin and if i dont remember completely wrong it has been there all the time.

Posted

Everything in your cgi-bin was placed by you... promise :(

 

Found this about randhtml:

 

The Random HTML generator can be used to pick a text (or HTML) string out of a list of possibilities and insert it into an SSI enabled (.shtml) web page. This is useful for including random text or HTML code in pages so as to produce varied quotes, images or just about anything else.

 

Before using this script in your web pages you will first need to set it up by entering a number of lines of text. The script can then be used to pick one of these lines of text at random and include it in your web page(s). Begin by clicking the Random HTML link from within the Script Centre in your Control Panel. You can then enter a number of sections of text in the box provided. Each section of text needs to go on its own line. You cannot include newline characters in the middle of a single piece of text as this will cause it to be treated as two separate sections of text. Of course, you can include the HTML <br> tag to represent a newline within a section of HTML code.

When you have finished entering sections of text for the script to choose from, click on the Save button.

You may return to this page at any time to add, delete or modify the sections of text you have entered.

 

As mentioned above, the Random HTML feature makes use of Server Side Includes (SSI), so you will need to give any pages which are to use it an extension of .shtml instead of the normal .html or .htm web page extension. The following code should be included in your .shtml page(s) at the position in the page(s) where you want the random content to appear:

 

<!--#exec cmd="cgi-bin/randhtml.cgi"-->

 

Your .shtml web pages must be placed in the top level public_html folder in order to successfully call the Random HTML generator. The script won't work if called from a web page in a sub folder.

 

As an alternative to modifying your random sections of text through your Control Panel, you may instead prefer to create an ordinary text file containing your random lines of text. You can then upload this file using an FTP program (or the File Manager), in place of the existing random text file if it already exists. The random text file is called .randhtml and is located in the top level folder of your account space. As the .randhtml file name begins with a full stop character it is a hidden file and will normally be hidden from view. You will need to set up your FTP program to allow the viewing of hidden files in order to see it on the server.

 

The Random HTML generator works by calling a file called randhtml.cgi which is automatically installed in your public_html/cgi-bin folder when you select the Random HTML option from the Script Centre in your Control Panel.

Posted
Everything in your cgi-bin was place by you... promise  :)

However, it probably should be pointed out that several cgi's (including randhtml.cgi) are "one-click installs" from cpanel.

 

So if you happened to click on Random CGI Generator in your cpanel even just to see what it was, it would have installed randhtml.cgi in your cgi-bin and you may not have realized it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...