PHP Scripting Language
PHP is a server-side, cross-platform, HTML embedded scripting
language that lets you create dynamic web pages. PHP-enabled web pages
are treated just like regular HTML pages and you can create and edit
them the same way you normally create regular HTML pages. PHP is
mainly focused on server-side scripting, so you can do anything any other CGI program can do,
such as collect form data, generate dynamic page content,
or send and receive cookies. PHP is the programming language used with
the MySQL programming language to
create the osCommerce shopping cart engine that is the underlying basis
for our free AeroCART shopping cart (see PHP
shopping cart demo here)
There are three main areas where PHP scripts are used.
Server-side scripting: This is the most traditional
and main target field for PHP. You need three things
to make this work.
You can access the PHP program output with a web browser,
viewing the PHP page through the server. All these can
run on your home machine if you are just experimenting
with PHP programming.
Command line scripting: You can make a PHP script
to run it without any server or browser.
You only need the PHP parser to use it this way.
This type of usage is ideal for scripts regularly
executed using cron (on *nix or Linux) or Task Scheduler (on
Windows). These scripts can also be used for simple text
Writing desktop applications: PHP is probably
not the very best language to create a desktop
application with a graphical user interface, but if
you know PHP very well, and would like to use some
advanced PHP features in your client-side applications
you can also use PHP-GTK to write such programs. You also
have the ability to write cross-platform applications this
For the majority of the servers PHP has a module,
for the others supporting the CGI standard, PHP can work
as a CGI processor - with PHP, you have the freedom of choosing an operating
system and a web server. You also have the choice
of using procedural programming or object oriented
programming, or a mixture of them.
Although not every
standard OOP feature is implemented in PHP 4,
many code libraries and large applications (including
the PEAR library) are written only using OOP code.
With PHP you are not limited to output HTML. PHP's abilities
includes outputting images, PDF files and even Flash movies
(using libswf and Ming) generated on the fly.
You can also
output easily any text, such as XHTML and any other XML file.
PHP can autogenerate these files, and save them in the file
system, instead of printing it out, forming a server-side
cache for your dynamic content.
One of the strongest and most significant features in PHP is its
support for a wide range of databases. Writing a database-enabled
web page is incredibly simple.
PHP has extremely useful text processing features, from the
POSIX Extended or Perl regular expressions to parsing XML
While using PHP in the e-commerce field, you'll find
the Cybercash payment, CyberMUT, VeriSign Payflow
Pro and MCVE functions useful for your online payment
There are also other interesting
extensions, the mnoGoSearch search engine functions,
the IRC Gateway functions, many compression utilities
(gzip, bz2), calendar conversion, translation, etc.