Cgi scrnpts

Common Gateway Interface (CGI) scripts are defined as script files executed on a web server in response to a user request. They are commonly used to process data sent when a form filled in by a user is sent back to the web server. A CGI program is executable, and is basically the equivalent of letting visitors run a program on your system. The most common form found on artist web sites is the e-mail registration form that gathers e-mail addresses from visitors so that they may be added to the mailing list. The "Tell a friend" form is another example of a GCI script.

Forms

Forms are a common and popular feature on web sites. The e-mail signup and tell-a-friend scripts mentioned later are examples of simple forms. But forms are used for all kinds of purposes, from gathering information to processing e-commerce orders. Most high-end web development programs offer some type of features for creating forms. One of the important aspects of creating a form is determining where the information will go—either stored as a database on a server or sent as an e-mail to the appropriate person. The first step involves creating the form and specifying the action to be taken upon submission (where the data go). Then, the particular form fields can be created to elicit information from the web visitor. There are also companies online who provide form or survey features. Some start with a basic, free plan with many of the more advanced features reserved for the paid plans. These services have user-friendly web sites that allow even the novice to create a form, save the data, and analyze the results. The most popular of these is Survey Monkey. The company hosts the forms on its site. Another such service, Freedback, does not host the form but helps users create the form and then capture the HTML code to place on the Freedback web site. Survey Monkey stores the data—the filled-out forms—on its web site with convenient features for analyzing or downloading the data. Freedback sends the data to the e-mail address specified on the account.

Guestbook script

Here is a simple CGI script for creating a form for signup for a mailing list:

<FORM ACTION="http://www.artistwebsite.com/mailinglist/subscribe.pl" METHOD="post"><INPUT TYPE="hidden" NAME="account" VALUE="hutchtom"><INPUT TYPE="hidden" NAME="body" VALUE="<BODY BGCOLOR=white TEXT=black LINK=blue VLINK=darkblue>"><INPUT TYPE="hidden" NAME="action" VALUE="subscribe"><TABLE BORDER="2" CELLPADDING=0 CELLSPACING=0><TR><TD><TABLE BORDER="0" CELLPADDING=2 CELLSPACING=0 BGCOLOR="#eeeeee"><TR BGCOLOR="#cccccc"><TD><B>Your e-mail:</B></TD><TD><INPUT TYPE="text" NAME="email"></TD></TR><TR><TD COLSPAN="2"><INPUT TYPE="submit" VALUE="Join mailinglist!"></TD></TR> </TABLE></TD></TR> </TABLE> </FORM>

Most commercial web entities want more information than just the person's e-mail address, so more elaborate scripts ask for additional information, including demographics. This script involves storing the information in a database to be accessed by the web master.

TELL A FRIEND SCRiPT

The tell-a-friend script is illustrated in Figure 6.7. As a result of automated spamming programs that are abused by unscrupulous web marketers, many such forms now include a component to verify that a human is filling out the form, instead of an automated software program.

FiGuRE 6.5

Example of forms.

FiGuRE 6.5

Example of forms.

figure 6.6

Join Now! form.

<FORM ÄCIION=*'üttp://www,Javascript .nu/cgi4 free/tellafrier.d/tell, asp" METHOD="pcst"> <INPDT TYEE= "hidden" NAME-"yoururl" VALUE-"http ://www.hutchtom. com">

<TABLE 30RDER="2" CELLPADDI NG=0 CELLSPACING=0>

<TRXTDXTABLE 30RDEP.="0" CELLPÄDDIHG-2 CELLS PACING= 0 3GCOLOR="*eeeeee">

<TR 3GCOLOR= "ícccccc"XTD COLSPAN="2 "X3>lell a friend abouc chis site</Bx/TDx/TR>

CTRXTOYoúr name : C/TDXTDXINPÜT IYFE="text" NAME="name"X/TDX/TR>

<TRXTD>Your e-mail ; </TDXTDX INPUT TYPE»"text" NÄHE - " f r cm" X / T Dx / T R>

<TRxTD> Friend's e-mail : </ TDx TDx INPUT ±YPE="text" NAME-"to" x/TDx /TR>

<TRXTD COLSPAN= "2 "XINPUT TYPE="submit" VALDE="Iell a Friend ! *X/TDX/TR>

The code above will result in this form:

Tell a friend about this site

Your name: Your e-mail: Friend's e-mail:

Tell a Friend!

Tell-a-friend form. (Courtesy of CGI4Free.com.)

JAVA AND JAVASCRIPT

Whereas CGI is for server-side programming, often referred to as back-end programming, JavaScript is used for client-side programming, often referred to as front-end programming (although it can also be used for server side programming). Server side programming runs on the host's server, whereas client side programming runs in the user's browser. Wikipedia has the following paragraph to explain the difference:

Server-side scripting is a web server technology in which a user's request is fulfilled by running a script directly on the web server to generate dynamic HTML pages. It is usually used to provide interactive web sites that interface to databases or other data stores. This is different from client-side scripting where scripts are run by the viewing web browser, usually in JavaScript. The primary advantage to server-side scripting is the ability to highly customize the response based on the user's requirements, access rights, or queries into data stores.

According to Ibama Tmunotein in his article Client-side and Server-side JavaScript, "Server-side JavaScript is ideal for creating web applications that can be run on any platform, on any browser, and in any (programming) language."

Java is a programming language developed by Sun. NetScape responded by creating JavaScript. Microsoft then added its own version of JavaScript to Internet Explorer, called JScript (D. Smith, 1998). The difference between Java and JavaScript is that Java can stand on its own whereas JavaScript must be placed inside an HTML document to function. JavaScript is text that is fed into a browser that can read it and then is enacted by the browser. It can be modified on the fly. Java, on the other hand, creates a "standalone" application—the Java "applet" (a small application), which is a fully contained program. Java needs to be recompiled if it is modified, and then reinserted into the web page.

RESOURCES FOR SCRiPTS

Online HTML Code Generator, http://htmlcode.discoveryvip.com Click & Go drop down list generator, www.webdevtips.co.0uk/webdevtips/codegen/clickgo.shtml Meta tag and SEO generators, www.submitcorner.com Guestbook and mailing list script generators, www.javascript.nu/cgi4free HTML and CSS scripts, www.hypergurl.com/htmlscripts.html Updated information available at www.WM4MB.com.

WEB WIDGETs

Web widgets are defined as a portable piece of code that an end user can install and execute within any separate HTML page. They often use DHTML, Adobe Flash, or JavaScript programming language and wrap it up in a nice user interface. Often these widgets are incorporated into social networking pages, blogs, and personal web sites, installed by the user. Not all widgets are compatible with all systems. In 2007, known as the year of the widget, the top social networking sites began to open up their platforms to widgets such as iLike, developed by third parties.

Marketers are creating new ways to use widgets to advertise and sell products. Here is how widgets such as iLike work. The widget company hosts a web site where the end user can construct the personalized parameters of the widget. The user-friendly interface allows the user to customize and personalize the widget, such as create a playlist, upload favorite photographs, and so forth. Then with a mouse click and a password, users upload the widget to their social networking page, which seamlessly and transparently adds the special feature to their social networking page or web page. This allows for content to be dynamic as the widget updates information based on the user's choices and activity—such as monitoring iTunes listening activity to create a playlist to be posted on a social networking site or whenever the user adds photos to the web site that provides the service and the widget.

FiGuRE 6.8

OnTour widget. (Courtesy PassAlong Networks www.passalong.com.)

ontour _

O FEATURED ARTISTS

Los Angeles

9.27

Cirque du soldi Prese... Staptes center

T£koi Inio A

Tour dates byPdiSTAf?

1 ' V C onctft Hotwire

©

MY ARTISTS

9.29 Nada Sur;

9.29 Chris Brown

10.04 Chris Brown

10.07 Keane

10.10 The Dresden Oolis

10.14 Yoianda Adams

Goson AfTimirn.. Tne Winem lg Verizon wireless, Gason Ampmtn.. GreoK Tneaire Mustc Box <& Fo,. Tne Forum

Mflitpn rn Rkinp

9,26 Chris Brown

9.29 Nada Sur;

9.29 Chris Brown

10.04 Chris Brown

10.07 Keane

10.10 The Dresden Oolis

10.14 Yoianda Adams

Goson AfTimirn.. Tne Winem lg Verizon wireless, Gason Ampmtn.. GreoK Tneaire Mustc Box <& Fo,. Tne Forum

Mflitpn rn Rkinp

T£<oi Inlo tc*oi inio Tc*ei inlo Tc*ci In ig Tooi into T>;ttei Inlo Tkkoi |niq

Refresh

Beyonce I / ■ Pre-Order wh I New Album , t H + Exclusives iTuneP T

I Ol Shadow

I Exclusive EP

Fore example, the web site www.slide.com allows users to upload pictures and create slide shows that they can share with other web users. The slide.com site creates widgets that work with MySpace, Facebook, Bebo, Friendster, Orkut, Hi5, Tagged, Xanga, and the FunWall for Facebook users. Music marketers have starting using widgets to allow fans to add content to their social networking pages. One such company, PassAlong Networks, offers widgets with features that promote the artists the company is working with. These widgets can be found on the artists' web sites and allow fans to place this artist-featured content on their own sites.

FiGuRE 6.9

A typical graphic verification image.

FiGuRE 6.9

A typical graphic verification image.

Email Marketing Step By Step Guide

Email Marketing Step By Step Guide

I realize theres a lot of misinformation surrounding this subject, so today Im going to explain everything you need to know about list building. Having an email list is useless If you dont understand how to effectively use it to its fullest potential.

Get My Free Ebook


Post a comment