991028.html | WebReference

991028.html

((((((((((((((((( WEBREFERENCE UPDATE NEWSLETTER ))))))))))))))))) October 28, 1999

_____________________________SPONSORS_____________________________

This newsletter is sponsored by: Netmind, Charge.com, VeriSign and Career Magazine __________________________________________________________________

******************************************************************

Free Site-Search Capability!

NetMind Search-it not only allows your visitors to search your site for content of interest, but also brings those visitors back whenever their search results change! Adding this free functionality to your site takes less than five minutes. To install Search-it or to get more info, visit:

http://www.netmind.com/html/webmaster10.html

******************************************************************

Now with over 82700 subscribers!

http://www.webreference.com http://www.webreference.com/new/ http://www.webreference.com/new/submit.html New this week on WebReference.com and the Web:

1. FEATURED ARTICLE: Intro to PHP 2. OTHER VOICES: * Book Excerpt: The Cathedral & the Bazaar: The Magic Cauldron * Interview with the Father of the Web 3. NET NEWS: * U.S. House Bans Cybersquatting * White House Opposes Cybersquatting Bill * Thirst for Knowledge Drowns Britannica Site

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Welcome to the Thursday edition of the WebReference Update text newsletter. Each week, we'll be featuring a new article contributed by our readers through our Open Publishing Initiative. This week, writer Stirling Hughes gives us an introduction to the world of PHP programming. Submit your story and win fame and free prizes!

http://www.webreference.com/new/submit.html

Spread the word! Feel free to send a copy of this newsletter to your friends and colleagues, and while you're at it, snap a link to WebReference.com. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. FEATURED ARTICLE: Intro to PHP

In this article we'll introduce you to one of the Internet's hottest and fastest growing server side programming languages, PHP. PHP (or Personal HomePage Tools) was created by Rasmus Lerdorf over three years ago to track visitors to his homepage. PHP has since evolved into a powerful server-side markup language with syntax that resembles a mix between Perl and C.

Why Use PHP

Most Web developers know that Web pages are more than pretty pictures and text; these days, even the most amateur of sites strive to have some sort of animation or interactivity. Most of the higher end sites have features such as discussion forums, search engines and/or shopping carts. PHP enables you to add features quickly.

The old fashioned approach to adding interactivity was to use CGI scripts in Perl. The problem is that CGI is not very scalable; each new request to a CGI script requires the server to start a new process in the kernel, which uses both CPU time and memory, making CGI scripts much slower which in turn make multiple concurrent CGI scripts run very slowly. PHP solves this problem by becoming a part of the Web server itself, saving the end user a considerable amount of load time.

Another reason to use PHP is because it's free. That's right, PHP is an open source project, meaning that any user can download both the source code and executables for PHP and install them on their computer for free. Because PHP is open source, it is solid and is constantly being improved by many experienced programmers. It is currently available for all major platforms.

Finally, PHP is easy. If you know C or Perl, learning PHP is a cinch. The language is a mix between the two, taking the best features from both. Plus PHP adds features to solve common problems that programmers often encounter when programming for the Web. For example, you can embed PHP code directly into an HTML file, whereas in Perl and C you would have to use additional print statements to output HTML. Another advantage to PHP is its native database support for 12 databases (including mSQL and mySQL), which allows access to the databases directly through SQL statements. And if you don't know either of these programming languages, then PHP is an excellent gateway into the world of programming.

******************************************************************

ADD CREDIT CARD ACCEPTANCE TO YOUR WEB PAGE Enhance your web page by making it easier for customers to order your product or service. Accepting credit cards from your customers is the single most effective thing you can do to increase sales online. You can apply online with the best rates anywhere, no application fee, and no obligation at Charge.Com. Click here for more information: http://www.charge.com/webref

******************************************************************

What is PHP?

So now that I've whetted your appetite, let's learn some more about PHP.

To start off I'll throw some simple PHP code at you (this assumes you understand HTML):

basic.php3

1: <html> 2: <head> 3: <title>A Basic PHP page</title> 4: </head> 5: <body bgcolor="#ffffff" text="#000000"> 6: <?php 7: $date = date( "l F d, Y" ); 8: print( $date ); 9: ?> 10: </body> 11: </html>

The function of this code is simple. First we start off the document with the normal HTML headers, nothing new there. What is new is the material on lines 6 through 9; here we see simple PHP code which will print out the current date. Here is a line by line explanation of what happens in lines 6 through 9:

Line 6: Tells the PHP preprocessor that the PHP code has begun. This is like the <html> at the beginning of the document which tells the Web browser to treat the document as an HTML language. Line 7: A lot going on in this line - first we initialize (assign a value to) the variable $date. The value is a formatted date generated by PHP's built in date function. Line 8: Here we use the built in print function to print the variable $date out on the screen. Line 9: Tell the preprocessor to stop interpreting PHP code.

This is a basic example of PHP's features, and a little bit of source code to give you the idea. This article's purpose is to introduce PHP, rather than write a tutorial on PHP. Subsequently, I'm not covering the syntax in depth but rather giving a taste of the language. Other tasks that PHP is especially good at are database access, disk access, networking and text manipulation. You can find articles that cover these features on the sites listed below.

Conclusion

In this article, we have discussed the motives for using PHP, what PHP is and even gotten into writing some source code. We have also gone over some of the history of PHP. However, this is meant only as an introduction, to help you on your way to becoming an experienced PHP programmer. For more information, I have provided a list of links which will serve to help further your knowledge of PHP. Happy trails!

Links

The Official PHP site -- http://www.php.net/ PHP Builder -- http://www.phpbuilder.com/ Devshed -- http://www.devshed.com/ Webmonkey -- http://www.hotwired.com/webmonkey/99/21/index2a.html Webreference -- http://webreference.com/perl/xhoo/php1/ The Web2010 tutorial page -- http://www.web2010.com/tutorial/ PHP Wizard -- http://www.phpwizard.net

Author Info: Stirling Hughes can be reached at stirling@scalarsplit.com, or at http://www.scalarsplit.com/

******************************************************************

Start preparing for holiday customers NOW - protect your site with 128-bit SSL encryption! Get VeriSign's FREE guide, "Securing Your Web Site for Business." You will learn everything you need to know about using SSL to encrypt your e-commerce transactions for serious online security. http://www.verisign.com/cgi-bin/go.cgi?a=n032601950009000

******************************************************************

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2. OTHER VOICES: Book Excerpt: "The Cathedral & the Bazaar: The Magic Cauldron," Interview with the Father of the Web

>Book Excerpt : "The Cathedral & the Bazaar"

Subtitled "Musings on Linux and Open Source by an Accidental Revolutionary," this new book by open source guru Eric S. Raymond contains revised and expanded versions of the essays that led to Netscape's decision to release their browser as open source, put Linus Torvalds on the cover of Forbes Magazine and Microsoft on the defensive, and helped Linux to rock the world of commercial software. This sample chapter contains enough fresh thoughts to keep you thinking for days to come.

http://www.ora.com/catalog/cb/chapter/magic-cauldron.html O'Reilly/Eric Raymond, 1999

>Interview with the Father of the Web

We reviewed Tim Berners-Lee's new book, "Weaving the Web" a few weeks ago, so we were excited to see this new interview with the author. Bernes-Lee talks more on his role in the development of the Net, and where he sees it going in the future.

http://www.wired.com/news/technology/0,1282,31830,00.html Wired.com, 991023

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3. NET NEWS: U.S. House Bans Cybersquatting, White House Opposes Cybersquatting Bill, Thirst for Knowledge Drowns Britannica Site

>U.S. House Bans Cybersquatting

The House of Representatives this week gave its stamp of approval to a bill prohibiting cybersquatting with the intention of profiting off of a domain name. The legislation targets addresses which imitate a trademark or well-known business name, and carries a fine of up to $100,000. http://www.internetnews.com/bus-news/article/0,1087,3_226851,00.html InternetNews.com, 991027

>White House Opposes Cybersquatting Bill

President Clinton announced his opposition to the cybersquatting bill, saying such a law could fragment international enforcement of trademark laws, and should be left to ICANN. http://www.zdnet.com/zdnn/stories/news/0,4586,2383443,00.html ZDNet.com, 991028

>Thirst for Knowledge Drowns Britannica Site

Encyclopaedia Britannica's management confessed Tuesday that last week's ploy to give away for free on the Internet the entire content of their highly regarded, 40-volume reference set has collapsed under the sheer weight of traffic. http://www.chicago.tribune.com/tech/news/article/0,2669,ART-36854,FF.html Chicago Tribune, 991027

That's it for this week, see you next time.

Andrew King Managing Editor, WebReference.com update@webreference.com

Eric Cook Assistant Editor, WebReference.com ecook@internet.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ WebRef wants you. Yes, you! You too could be in this space, sharing your thoughts with the rest of the WebReference readership.

Plus now, if your article is chosen to be published, you win a free copy of HoTMetaL Pro 6.0 and a cool internet.com t-shirt! Just submit your article idea at: http://www.webreference.com/new/submit.html ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sponsoring the WebReference Update is a cost effective way to reach thousands of qualified buyers. E-mail ffazio@internet.com to find out how. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Also on Internet.com .... http://www.Internet.com

Internet News Channel http://www.internet.com/sections/news.html Internet Stocks Channel http://www.internet.com/sections/stocks.html Internet Technology Channel http://www.internet.com/sections/it.html Web Developer Channel http://www.internet.com/sections/webdev.html ISP Resources Channel http://www.internet.com/sections/isp.html Internet Marketing Channel http://www.internet.com/sections/marketing.html Download Channel http://www.internet.com/sections/downloads.html Internet Resources Channel http://www.internet.com/sections/resources.html International Channel http://www.internet.com/sections/international.html

~~~~~~~~~~~~~~~~~~~~CLASSIFIED~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CareerMag.net - the best career resource on the web.

Search over 80,000 current job listings, post resumes,

& read articles written by the best authors in the field.

www.careermag.net - Where America looks for work.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To SUBSCRIBE to the WEBREFERENCE-UPDATE: 1. subscribe@webreference.com or webreference-update-text-on@list4.internet.com

To UN-SUBSCRIBE from WEBREFERENCE-UPDATE do NOT reply to this message, instead: 1. unsubscribe@webreference.com or webreference-update-text-off@list4.internet.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Copyright (c) 1999-2000 Jupitermedia Corp. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ WEBREFERENCE-UPDATE is powered by Lyris(R) http://www.lyris.com