PHP is an open source, server-side, HTML embedded scripting language used to create dynamic Web pages. The advantages of PHP are its flexibility and its high compatibility with other databases. Moreover, PHP is considered to be easy to learn.
The functions of PHP concern server-side scripts. PHP can perform any task that any CGI (Common Gateway Interface) program can do and handles data exchange between the server and software. Thus, PHP can collect data or create dynamic content websites.
Three main functions distinguish PHP in particular:
Example of an embedded PHP script in an HTML document:
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.01 Transitional//EN "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Page with PHP script </title> </head> <body> <?php echo "This is a PHP script"; ?> </body> </html>
The PHP scripting language can be used with all popular operating systems. Moreover, PHP is compatible with most web servers such as Apache. The user advantages at a glance:
A small disadvantage when programming with PHP is that it generates URLs that are usually cryptic for users and provide fewer keywords for search engines. But with a simple mod_rewrite the PHP-generated URLs can be converted to SEF URLs (Search Engine Friendly URLs).
becomes, for example
www. samplewebsite.com /vacation-at-the-Grand-Canyon.html
Basically it is also possible to parse all HTML elements via PHP. In that case the original data would be completely obscured. This method would only be beneficial if content is not to be used for indexing.