Page 8 - Open Soource Technologies 304.indd
P. 8

Web Technologies-I



                   Notes         Introduction

                                 Up until recently, scripting on the internet was something which very few people even attempted,
                                 let alone mastered. Recently though, more and more people have been building their own websites
                                 and scripting languages have become more important. Because of this, scripting languages are
                                 becoming easier to learn and PHP is one of the easiest and most powerful yet.
                                 PHP was originally created by Rasmus Lerdorf in 1995. The main implementation of PHP is now
                                 produced by the PHP Group and serves as the de facto standard for PHP as there is no formal
                                 specification. PHP is free software released under the PHP License; it is incompatible with the
                                 GNU General Public License (GPL) due to restrictions on the usage of the term PHP. While
                                 PHP originally stood for “Personal Home Page”, it is now said to stand for “PHP: Hypertext
                                 Preprocessor”, a recursive acronym.
                                 PHP stands for Hypertext Preprocessor and is a server-side language. This means that the script is
                                 run on your web server, not on the user’s browser, so you do not need to worry about compatibility
                                 issues. PHP is relatively new (compared to languages such as Perl (CGI) and Java) but is quickly
                                 becoming one of the most popular scripting languages on the internet.
                                 In this unit we are going to discuss what we can actually do using PHP and the originations of
                                 the PHP as a language. We also discuss the installation of the PHP and some features of PHP.
                                 As mentioned earlier, PHP is a server-side scripting language. This means that, although your
                                 users will not need to install new software, your web host will need to have PHP set-up on their
                                 server. After installing the set-up we can easily run the PHP program.

                                 1.1 What does PHP Do?


                                 PHP can be used in three primary ways:
                                 1.1.1 Server-side Scripting

                                 PHP was originally designed to create dynamic web content, and it is still best suited for that task.
                                 To generate HTML, you need the PHP parser and a web server to send the documents. Lately,
                                 PHP has also become popular for generating XML documents, graphics, Flash animations, PDF
                                 files, and more.

                                 1.1.2 Command-line Scripting
                                 PHP can run scripts from the command line, much like Perl, awk, or the UNIX shell. You might
                                 use the command-line scripts for system administration tasks, such as backup and log parsing.
                                 1.1.3 Graphical Scripting

                                 Using PHP-GTK, you can write full-blown, cross-platform GUI applications in PHP.
                                 PHP runs on all major operating systems, from UNIX variants including Linux, FreeBSD, and
                                 Solaris to such diverse platforms as Windows and Mac OS X. It can be used with all leading web
                                 servers, including Apache, Microsoft IIS, and the Netscape/iPlanet servers.

                                 The language is very flexible. For example, you are not limited to outputting just HTML or other
                                 text files—any document format can be generated. PHP has built-in support for generating PDF
                                 files, GIF, JPG, and PNG images, and Flash movies.
                                 One of PHP’s most significant features is its wide-ranging support for databases. PHP supports
                                 all major databases (including MySQL, PostgreSQL, Oracle, Sybase, and ODBC-compliant
                                 databases), and even many obscure ones. With PHP, creating web pages with dynamic content
                                 from a database is remarkably simple.


        2                                 LOVELY PROFESSIONAL UNIVERSITY
   3   4   5   6   7   8   9   10   11   12   13