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

Unit 1: Introduction to PHP



            Finally, PHP provides a library of PHP code to perform common tasks, such as database abstraction,   Notes
            error handling, and so on, with the PHP Extension and Application Repository (PEAR). PEAR is
            a framework and distribution system for reusable PHP components.

            1.2 A Brief History of PHP

            Rasmus Lerdorf first conceived of PHP in 1994, but the PHP that people use today is quite different
            from the initial version. To understand how PHP got where it is today, it is useful to know the
            historical evolution of the language.

            1.2.1 The Evolution of PHP

            The PHP 1.0 announcement to the Usenet newsgroup comp.infosystems.www.authoring.cgi in June
            1995.
            Logging accesses to your pages in your own private log files. Real-time viewing of log information
            providing a nice interface to this log information. Displaying last access information right on
            your pages. Full daily and total access counters. Banning access to users based on their domain.
            Password protecting pages based on users’ domains. Tracking accesses based on users’ e-mail
            addresses. Tracking referring URL’s HTTP_REFERER support. Performing server-side includes
            without needing server support for it. Ability to not log accesses from certain domains (i.e. your
            own). Easily create and display forms. Ability to use form information in following documents
            here is what you do not need to use these tools:
               •  You do not need root access install in your ~/public_html dir.
               •  You do not need server-side includes enabled in your server.

               •  You do not need access to Perl or Tcl or any other script interpreter.
               •  You do not need access to the http log files. The only requirement for these tools to work
                 is that you have the ability to execute your own CGI programs.
            The announcement talks only about the tools that came with PHP, but behind the scenes the goal
            was to create a framework to make it easy to extend PHP and add more tools. The business logic
            for these add-ons was written in C a simple parser picked tags out of the HTML and called the
            various C functions.
            PHP/FI is a server-side HTML embedded scripting language. It has built-in access logging and
            access restriction features and also support for embedded SQL queries to mSQL and/or Postgres95
            backend databases. It is most likely the fastest and simplest tool available for creating database-
            enabled websites. It will work with any UNIX-based web server on every UNIX flavour out there.
            The package is completely free of charge for all uses including commercial. Feature List. Access
            Logging Log every hit to your pages in either a dbm or an mSQL database. Having hit information
            in a database format makes later analysis easier. Access Restriction Password protects your pages,
            or restricts access based on the referring URL plus many other options. mSQL Support Embed
            mSQL queries right in your HTML source files. Postgres95 Support Embed Postgres95 queries
            right in your HTML source files. DBM Support DB, DBM, NDBM and GDBM are all supported.
            RFC-1867 File Upload Support Create file upload forms. Variables, Arrays, Associative Arrays.
            User-Defined Functions with static variables + recursion. Conditionals and While loops Writing
            conditional dynamic web pages could not be easier than with the PHP/FI conditionals and
            looping support. Extended Regular Expressions Powerful string manipulation support through
            full regexp support. Raw HTTP Header Control lets you send customized HTTP headers to the
            browser for advanced Features such as cookies. Dynamic GIF Image Creation Thomas Boutell’s
            GD library is supported through an easy-to-use set of tags.






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