Pulsant provides a couple of CGI scripts for customers wishing to add functionality to their website.
This CGI adds a hit counter to a webpage. Each time the page is accessed, the counter is incremented. To add a counter to your page, firstly add the following line of HTML code into your index.html page or wherever you would like the counter to appear:
Remember to change <username> for your own Pulsant account username.
There are 9 display options for the counter, which you can control from the line of HTML code given above. The display is controlled by the &dd=B part of the string – in this case option B is selected. The range of display options can be described as follows:
&dd=A – green “calculator” digits against black background
&dd=B – white “alarm clock” digits against black background
&dd=C – white “italic” digits against black background
&dd=D – small green digits against black background
&dd=E – very small black “square” digits against white background
&dd=bang – black “dingbats” type display against white background (output not legible)
&dd=cd – black “hand-written” digits against white background
&dd=cdd – green “pixellated” digits against black background
&dd=cdr – red digits against black background
Secondly, you have to create a directory in your public_html folder called “log” ie “public_html/log”. This is where the countfile is kept which holds the number of hits your counter has received, not that you’d ever want to alter the file to indicate a higher hitcount, would you?. Please note if you wish to run on a windows hosted site that this must be created in the Linux account via ftp.lumison.net or the shell server and not in the Windows webspace as the script points to your Linux system account and not the Windows account
This is a form-to-email script which can be added to a webpage, so that enquiries, feedback or anything else that you want can be sent from a form on your website to email.
Here is some example code you can cut and paste into the source code of your webpage and then modify to create your form:
<form method=”post” action=”http://www.lumison.net/cgi-bin/sendform.pl”>
<input type=”hidden” name=”from” value=”[email protected]”>
<input type=”hidden” name=”to” value=”[email protected]” >
<input type=”hidden” name=”subject” value=”Sendform.pl example”>
Email address: <input type=”textfield” name=”email_address”>
Comment: <textarea name=”comments” cols=”25″ rows=”4″> </textarea>
Once you have the basic form on your page, you can customise it by adding lines to it in the form:
<input type=”hidden” name=”variable” value=”value”>
The sendform script requires that your end-users provide the HTTP REFERER field. The referer field lets us know which website was used with the sendform.pl script.
Normally the referer is sent automatically, however the end-user could have installed security software or otherwise taken steps to hide this field.
Without the referer field, we have no way of verifying that your website is authorised to use the sendform script. This would cause the mail to be rejected.
If this requirement is causing you problems, we can optionally whitelist the content of your “to” field, so that mail will always be allowed to your email address, regardless of the status of the referer field. To arrange whitelisting, please contact Pulsant support.
The to line as shown above must always be given or the errorpage (see below) will be shown. This can contain a single address or a comma separated list of addresses.
You can also choose from the following variables:
from When the email is received by the intended recipient, the mail is given as being from this address. Without this line, the script defaults to “[email protected]”.
subject The subject of the mail received by the recipient. Without this line, the script defaults to “Response to Web form”.
mailtitle a title that will be put at the top of the email body text. Without this line, the script does not add a title.
successpage This specifies the page the script loads when the form has been filled in and submitted successfully. Without this line, the script defaults to “http://www.lumison.net/templates/successpage.html”.
errorpage This specifies the page the script loads if the required form fields (see mandatory below) have not been filled in. Without this line the script defaults to “http://www.lumison.net/templates/errorpage.html”.
mandatory This is a list of fields that the user MUST fill in for the form submission to work. This list should be comma-separated only. Without this line, the script has no mandatory fields.
email_as_from If this is set to “yes” in the form, you can create a form field named emailfield and use the content of that field as the from address in the email sent out. This only works if the form has a field called email.