Hosting Support
PHP Hypertext preprocessor

What is PHP and what does it stand for ?

PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly

PHP stands for PHP: Hypertext Preprocessor. This confuses many people because the first word of the acronym is the acronym. This type of acronym is called a recursive acronym

Top of Page

What's new in Version 4

There are a couple of articles written on this by the authors of PHP.Click here to read about them

Here's a list of some of the more important new features we think are relevant.

  • Extended API module
  • Generic web server interface that also supports multi-threaded web servers
  • Improved syntax highlighter
  • Native HTTP session support
  • Output buffering support
  • Reference counting

Top of Page

How to use PHP and some basic examples

To have your pages processed by the PHP script engine your pages must end in either .php or .php3 extensions. We have set up our servers in such a way that all files with the above extensions are not handled by the Webserver and are sent to PHP.

Hello World
Checking Your Browser Type
PHPInfo

Top of Page

Hello World

The code below must be entered in notepad or a simple text editor and saved with a .php extension. All the below code does is display, "Hello World"

<html><head><title>PHP Test</title></head>
<body>
<?php echo "Hello World<p>"; ?>
</body></html>

The point of the example is to show the special PHP tag format. In this example we used <?php to indicate the start of the PHP tag. I then put in the PHP statement and then closed the tag. You may jump in and out of PHP mode in an HTML file like this all you want. The colours you see are just a visual aid to make it easier to see the PHP tags and the different parts of a PHP expression.

To view the above code compiled click here

Top of Page

Checking Your Browser Type

The code below will check what sort of browser the person viewing the page is using. In order to do that we check the user agent string that the browser sends as part of its request. This information is stored in a variable. Variables in PHP always start with a dollar-sign in PHP. The variable we are interested in is $HTTP_USER_AGENT. To display this variable we can simply do:

<?php echo $HTTP_USER_AGENT; ?>

Top of Page

PHPInfo

There are many variables in PHP that are automatically set by us. To get a list of these variables use the following code below. Some programs may require certain variables be set/enabled to certain values. You may need to contact support to set these. Insert the code below to get a list of the current variables set on your webserver.

<?php phpinfo(); ?>

Note that although each server has the same standard installation applied to it, from time to time we make changes for clients, therefore do not assume if you have multiple accounts with us that each installation is identical. In most cases it will be but please note.

Top of Page

Hosting Support Menu

Getting started

Domain transfer

Is my domain active?

Control panel

Email setup

Outlook Express

Netscape

Web Based Email

PHP

FTP

Telnet

Custom errors

Perl/CGI scripts

Server Side Includes

Database use

Securing your data

Account Information

Site statistics

SQL Server 7

Subdomains

Domain Pointers

Search Engines

How do I ...