

















| 
|
Scripting: Examples -
Friday, November 21, 2008
|
CGI Script Examples
UNDER CONSTRUCTION
-
Hit Counters:
Any graphical look or text output, plus the ability to count the same user only once per session for a unique visitors counter.
-
Forms Processors:
Just about any information could be requested from the user and stored into a database or emailed. Hidden data can be recorded such as time, date, IP address and browser type. Error checking can search through the submitted data to find missing or impossible entries. This is important when you require a specific question to be answered or in determining garbage from valid email addresses, phone numbers, URLs, zip codes etc.
-
Email Verification:
A very useful tool for preventing users from using false identity. It works by requiring the user to enter their email address which is instantly automatically emailed an editable message. The message contains a randomly generated PIN or ID which the user must then enter at your site to prove they own the email address!
-
Mailing Lists:
This service allows your site to collect users who are interested in receiving newsletters and such from the site. Any information can be collected, with the option of email verification to prevent users from signing up other people. An admin allows you to view all user info, sign-up stats (such as sign ups per day/week/month), newsletter stats (date and content of past newsletters) and forms to send out the newsletter. Registered users may also unsubscribe at any time.
-
Guest Books:
A common feature of many web sites. Just about any information you want can be requested, and displayed in any format. Hidden information can also be recorded such as ip address. Entries can be public or requested private where it can only be viewed in the admin area. Admin also has the ability to delete or edit entries.
-
Message Boards:
This can be very customized with options including: Information requested (such as name, email, age/sex, location etc.), displayed with or without threads (for instance, to reduce clutter you could have the main post with only the number of replies under it or the names of people who replied), the use of cookies to remember a user's name or other info for when they come back (which can also tell them how many messages have been posted since their last visit and which ones), and filtering of profanity. An admin controls area enables you to delete and edit messages. A usefull feature is the ability to set a time period or message maximum for which the messages are shown before archived or deleted. This automatically cleans up the main page to only show recent messages and reduce loading time.
-
-Password Protection:
Although it's not the most secure way of doing it, this works perfectly fine for most applications. Scripts can be made where users get a password and/or user id. Once a person has logged in they could have access to either just that page one time or a whole part of the site until they were no longer active or left a particular page. An admin area could make different types of user groups or grant different access levels. It could also show logs of every login or notify you if one account was unsuccessfully logged in many times in case someone was trying to guess a password or something.
-
Suveys/Polls:
Such as my almost finished Smart Polls free service. Any number of questions could be made and updated, and data would be stored on the server. Results could then be seen like my site does by way of a bar graph or table. Results by day, week, month, age/sex etc could also be sorted. Only top results could be shown if wanted, and a customized Admin page with password protection could be made where all of this information can be updated on the fly. An option can also be added which prevents the same person from submitting info more than once (or any specific number of times, or unlimited) per session.
-
Leach Protection:
What this will do is prevent other sites from linking your images or other content for use on their site. That way your site wouldn't be wasting its server power. A good idea if you had linking banners or buttons that you wanted people to download and serve from their own site instead of requesting it from yours. It works by looking at the http referrer which should be the page on your site which shows the image. If is not from yourdomain.com then it would show a Stolen Alert image or nothing at all to the leaching site. It could also log the sites that were attempting to steal it.
-
Randomizers:
This can be used for a variety of uses such as: Displaying random graphics like advertisements, random quotes or tips of the day (instead of being random it could also change daily or whatever). the admin area could update the data to be used, and options could also set whether it is totally random, sequential or make sure that each item is used before another is repeated. This also ties in with banner advertising in case you have a site that has multiple advertisers. You would want to keep track of how many times each banner is used and stats could show the click through ratios of each banner. This could be helpful if you wanted the advertiser to have access to how their ad was performing. It could also have stats showing click throughs by hour of day, day, week and let you know if the same person was clicking a banner more than once.
-
Site Search Engine:
Not quite another Yahoo, but enough where it would search through the page titles and description tags to find the matches. As of now, I don't know how to have it search through the text of every page without slowing the server down a little. The admin area could set it so that certain pages or directories in the site are not included, and also set a time for when the page information is updated. There's a free service that works the same way is this. I used it but can't remember the name, maybe search-it.com?
-
Shopping Cart:
Shipping Stuff.....
-
Ad Management:
Ad Stuf.....
-
Easy Updater:
Update Stuff.....
|
|
|