You are on page 1of 18

DATABASES

Dep. of Electrical and Computer Engineering Faculty of Sciences and Technology University of Coimbra

LAB1 – Introduction to PHP*
This first lab work aims at introducing the PHP script language and exploiting its potential to create HTML pages having dynamic contents.

1. What is PHP? .................................................................................................................. 2 2. Basics of PHP .................................................................................................................. 3 2.1 First Example ........................................................................................................... 3 2.2 Variables ................................................................................................................. 4 2.3 Comments ............................................................................................................... 4 2.4 Arithmetic Operators ................................................................................................ 5 2.5 Assignment Operators .............................................................................................. 5 2.6 Comparison Operators .............................................................................................. 6 2.7 Logical Operators ..................................................................................................... 6 3. Flow Control and Loops ................................................................................................... 6 3.1 Conditional Statements ............................................................................................. 6 3.2 Loops ...................................................................................................................... 8 4. Functions in PHP ............................................................................................................10 4.1 Information about PHP – Function phpinfo() .............................................................10 4.2 Function header() ...................................................................................................11 4.3 Function date() .......................................................................................................12 4.4 Accessing Files ........................................................................................................12 5. Forms ............................................................................................................................15 6. Creating functions ..........................................................................................................15 6.1 Inclusion of other scripts inside of a script ................................................................16 7. Cookies .........................................................................................................................17 7.1 Creating a Cookie – Function setcookie() ..................................................................17 7.2 Reading a Cookie – Function isset() .........................................................................17 References .........................................................................................................................18 Checklist ............................................................................................................................18

Lab Work

MiEEC, DEEC-FCTUC

PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module. PHP primarily acts as a filter. Apache and MySQL. However. PHP can be deployed on most web servers. DEEC-FCTUC . A competitor to Microsoft's Active Server Pages (ASP) server-side script engine and similar languages. For this purpose. The acronym PHP stands for “PHP: Hypertext Preprocessor”. and the PHP Group provides the complete source code for users to build. such as Microsoft's Asp. Any PHP code in a requested file is executed by the PHP runtime. PHP now focuses mainly on server-side scripting. on almost every operating system and platform free of charge. usually to create dynamic web page content or dynamic images used on web sites or elsewhere. giving improved performance over its interpreter predecessor. Sun Microsystems' JavaServer Pages. It is available free of charge. taking input from a file or stream containing text and/or PHP instructions and outputs another stream of data. and mod_perl. many operating systems and platforms. the PHP parser compiles input to produce bytecode for processing by the Zend Engine. PHP is currently installed on more than 20 million websites and 1 million web servers [1]. What is PHP? PHP is a general-purpose scripting language originally designed for web development to produce dynamic web pages. and can be used with many relational database management systems (RDBMS). PHP is free software released under the PHP License. WAMP packages (Windows/ Apache/ MySQL Lab Work Page 2/18 MiEEC.LAB1 – Introduction to PHP Databases 1. It was originally created by Rasmus Lerdorf in 1995. and it is similar to other server-side scripting languages that provide dynamic content from a web server to a client. PHP originally stood for “Personal Home Page”. most commonly the output will be HTML. PHP is commonly used as the P in this bundle alongside Linux. although the P may also refer to Python or Perl or some combination of the three. customize and extend for their own use [2]. Originally designed to create dynamic web pages. 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 [2].net. PHP can be deployed on most web servers and as a standalone interpreter. The LAMP architecture has become popular in the web industry as a way of deploying web applications. PHP is especially suited to server-side web development where PHP generally runs on a web server. Since PHP 4. which generates the web page document.

A very simple example is presented below.pt/~a<student_number>. Web content management systems written in PHP include MediaWiki. Basics of PHP Some examples are presented throughout this section and the following sections to introduce PHP. The most basic instructions to generate text in the HTML document are echo and print. Use your student account to perform the proposed activities. Each line of PHP code must be terminated with „. Facebook.e. Any block of PHP instructions embedded into the HTML file is delimited by tags <?php and ?> and can be placed anywhere inside the HTML file.. and Digg.deec. is basically a HTML file which includes a set of instructions to generate dynamic contents. All websites created using these tools are written in PHP.php). a script.‟. i. over 20 million Internet domains had web services hosted on servers with PHP installed and mod_php was recorded as the most popular Apache HTTP Server module. Lab Work Page 3/18 MiEEC. Joomla. Edit and test this first example (file: helloworld. eZ Publish.e. Drupal and Moodle. i. ?> </body> </html> Activity 1. the former was used to print the message “Hello World” in the browser. PHP is used as the server-side programming language on 75% of all web servers.uc. 2.LAB1 – Introduction to PHP Databases / PHP) and MAMP packages (Mac OS X / Apache / MySQL / PHP) are also available. including the user-facing portion of Wikipedia. WordPress.1 First Example A PHP file. 2. 1 2 3 4 5 <html> <body> <?php echo "Hello World!". edit and test these examples through a Web browser in your own webpage located in a URL like: http://alunos. As of April 2007. In the example above. DEEC-FCTUC ..

3 Comments As in C++. Edit and test this example (file: concat.php). echo $txt1 . ?> </body> </html> Activity 2. $txt2 . the message “Hello World 1234” is printed in the browser.2 Variables Every variable in PHP starts with character „$‟. numbers or tables. 1 2 3 4 5 6 7 8 9 10 11 12 <html> <body> <?php // This is a comment /* This is a multi-line block of comments */ ?> </body> </html> Lab Work Page 4/18 MiEEC. In the example below. Variables may contain strings.LAB1 – Introduction to PHP Databases 2. the string “Hello World” is assigned to a variable named $txt. 1 2 3 4 5 6 7 8 <html> <body> <?php $txt="Hello World". ?> </body> </html> The character „. 1 2 3 4 5 6 7 8 9 <html> <body> <?php $txt1="Hello World". An example is presented below. the sequence // represents a single comment line and a multi-line block of comments is started with /* and ended with */. 2.‟ can be used to concatenate two or more variables. $txt2="1234". DEEC-FCTUC . " " . In the example below. echo $txt.

php to operators. Copy the file helloworld. DEEC-FCTUC . Lab Work Page 5/18 MiEEC.php and expand the code in the latter file to test the operands above.5 Assignment Operators Operator Example Meaning = += -= *= /= %= x=y x+=y x-=y x*=y x/=y x%=y x=y x=x+y x=x-y x=x*y x=x/y x=x%y Activity 3.LAB1 – Introduction to PHP Databases 2.4 Arithmetic Operators Operator Description Addition Subtraction Multiplication Division Examples Results + * / x=2 x+2 x=2 5-x x=4 x*5 15/5 5/2 5%2 10%8 10%2 x=5 x++ x=5 x-- 4 3 20 3 2. Use echo statements to show the operands’ result.5 1 2 0 x=6 x=4 % Modulus (remainder of division) ++ -- Increment Decrement 2.

LAB1 – Introduction to PHP Databases 2.6 Comparison Operators Operator Description Is equal to Is different from Is Greater than Is Less than Is Greater or equal than Is Less or equal than Example Result False True False True False True == != > < >= <= 5==8 5!=8 5>8 5<8 5>=8 5<=8 2. Flow Control and Loops 3.  switch – select an action from a set of different actions according different values of a given expression. DEEC-FCTUC . y=3 !(x==y) 3. 3. There are two types of conditional statements in PHP:  if … else – do an action if a logical condition is true otherwise (else) do another action.1 If Statement The if statement has the following syntax: 1 2 3 4 if <condition> <block to be executed if condition is true> else <block to be executed if condition is false> Lab Work Page 6/18 MiEEC. y=3 (x==5 || y==5) x=6.1.1 Conditional Statements Conditional statements are often required to choose different actions according different decisions.7 Logical Operators Operator Description And Or Not Example Result True False True && || ! x=6. y=3 (x < 10 && y > 1) x=6.

". $d=date("D"). 1 2 3 4 5 6 7 8 9 10 11 <html> <body> <?php $d=date("D"). echo "See you tomorrow.".2 Switch Statement The switch statement has the following syntax: 1 2 3 4 5 6 7 8 9 10 11 12 13 switch <expression> { case <value1>: <block1> break. Then. echo "See you next week. if ($d=="Fri") echo "Have a nice weekend!". case <value2>: <block2> break. } ?> </body> </html> Activity 4.LAB1 – Introduction to PHP Databases In the example below. DEEC-FCTUC . if a conditional block has multiple statements. … default: <default_block> break. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 <html> <body> <?php date_default_timezone_set('Europe/Lisbon'). } else { echo "Have a nice day!<br />". The break statement is used to avoid executing automatically the Lab Work Page 7/18 MiEEC. else echo "Have a nice day!". the message “Have a nice weekend” will be presented if today is Friday and “Have a nice day” otherwise. 3. ?> </body> </html> As in C/C++.php). Edit and test this example (file: weekday. } The statement tests sequentially the enumerated cases until the value mentioned in a case statement matches the expression value. curly brackets are used to delimit them (see the example below). if ($d=="Fri") { echo "Have a nice weekend!<br />". the respective block is executed.1.

case 2: echo "Number 2". while($i<=5) { Lab Work Page 8/18 MiEEC. In PHP.2.2 Loops Loops are often required to repeat the execution of a sequence of statements.php to print in the Web browser what weekday is today. break. default: echo "It is not a number between 1 and 3".LAB1 – Introduction to PHP Databases code block in next case.  do…while – executes a block once and repeat it while a given condition is true. 3. 3. case 3: echo "Number 3".1 While Loop The while statement has the following syntax: 1 2 while <condition> <block> The example below contains a loop that is repeated while a variable is less or equal than 5.  for – executes a block a given number of times. loops can be programmed using the following statements:  while – executes a block while a given condition is true. Edit and test this example (file: whatnumber. switch ($x) { case 1: echo "Number 1".  foreach – executes a block for each element of a table. The variable is incremented on each iteration. 1 2 3 4 5 6 <html> <body> <?php $i=1. An example is presented below. break. Activity 6. The default statement defines a block that is executed whenever none of the cases applies. DEEC-FCTUC . Write the script today.php). } ?> </body> </html> Activity 5. break. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 <html> <body> <?php $x=2.

the third one is an arithmetic operation with the loop counter (e. ?> </body> </html> Activity 8. Edit and test this example (file: dowhileloop. otherwise the loop ends. DEEC-FCTUC . 3.php).3 For Loop The for statement has the following syntax: 14 15 for (initiate_counter. $i++. $i++) { echo "Hello World! ". $i . } while ($i<5). increment counter). $i . The variable is incremented on each iteration. On each iteration. Edit and test this example (file: whileloop. echo $i .2. "<br />". "<br />". The example below displays 5 times the message “Hello World”.g. 1 2 3 4 5 6 7 <html> <body> <?php for ($i=1. condition. "<br />". the second one is the logical condition that must evaluate to true before each iteration.php). $i<=5. do { $i++. } ?> </body> </html> Activity 7. The example below contains a loop that is executed once and repeated while a variable is less than 5. echo "The number is " . update_counter) <block> It has three parameters: the first one is used to set the loop counter initial value. 3. 1 2 3 4 5 6 7 8 9 10 11 12 13 <html> <body> <?php $i=0.2.LAB1 – Introduction to PHP Databases 7 8 9 10 11 12 echo "The number is " . it also displays the counter value.2 Do-While Loop The do…while statement has the following syntax: 1 2 3 do <block> while <condition>. Lab Work Page 9/18 MiEEC.

Functions in PHP In this section. foreach ($a as $value) { echo "Current element: " . 1 2 3 4 5 6 7 8 9 10 11 <html> <body> <?php $a=array("one". Edit and test this example (file: foreachloop. current entry is assigned to a variable and a pointer to the array is automatically set to point to next entry. some functions supported by PHP will be presented. 1 2 3 4 5 6 <html> <body> <?php // General information only phpinfo(INFO_GENERAL).2. 4. On each iteration. $value . It is useful to solve problems related with PHP configuration.LAB1 – Introduction to PHP Databases 8 9 10 11 } ?> </body> </html> Activity 9. 3. all the information is retrieved.4 Foreach Loop The foreach statement has the following syntax: 1 2 foreach (<array> as <variable>) <block> This loop searches an array (or table). The example below displays the contents of a simple array. } ?> </body> </html> Activity 10.php). Please refer to [3] for a complete list of functions and more detailed information. only general information is retrieved. "<br />". In the first call.php). "two". // All the information Lab Work Page 10/18 MiEEC. DEEC-FCTUC . In the second call. namely the version being used and how it is configured.1 Information about PHP – Function phpinfo() The function phpinfo() can be used to print some useful information about PHP. "three"). Edit and test this example (file: forloop. 4. The example below calls twice function phpinfo().

"<br />". DEEC-FCTUC . 4. 1 2 3 4 5 6 7 8 9 <html> <body> <?php echo "URL: " . the browser being used and the user‟s IP.php). Cookie.php). the variable $_SERVER contains important information about the PHP server. Edit and test this example (file: phpinfo. it is displayed the user‟s URL. The variable is global. In PHP.2 Function header() The function header() can be used to send directly HTTP headers to the destination. Edit and test this example (file: phpservervars. $_SERVER["HTTP_USER_AGENT"] . such as user‟s URL. browser being used. Server) PHP license information Shows all of the above (default option) Activity 11. echo "Browser: " . Lab Work Page 11/18 MiEEC. This kind of information is stored in server variables. echo "IP address: " . etc. $_SERVER["REMOTE_ADDR"]. ?> </body> </html> Activity 12. Options available in function phpinfo(). It is important to call this function in the very beginning of the HTML page. 4. "<br />". GET. In the example below.1 PHP Server Variables Every server stores important information. $_SERVER["HTTP_REFERER"] . ?> </body> </html> Table 1. POST.1.LAB1 – Introduction to PHP Databases 7 8 9 10 phpinfo(). which means that it can be accessed from any point in a PHP script. Option Description General information about PHP server PHP credits INFO_GENERAL INFO_CREDITS INFO_MODULES INFO_ENVIRONMENT INFO_VARIABLES INFO_LICENSE INFO_ALL INFO_CONFIGURATION Current Local and Master values for PHP directives Loaded modules and their respective settings Environment variables information Shows all predefined variables (system.

The second one is optional and can be used to display a date different from current date.pt. 4. echo "Today is " . Edit and test this example (file: date.pt"). The first parameter specifies the filename (and its path) and the second one the mode of operation (see Table 3. 1 2 3 4 5 6 7 8 9 10 11 <?php // Redirects the browser header("Location: http://www. it returns 0 (false). Table 2 (next page) presents the available options.php). It accepts two parameters which are used in a very similar way to using fopen() function available in C. ?> </body> </html> Activity 14.php). page 14). g:i:s A"). according to the following syntax: 1 date(<date_format>[. ?> <html> <body> <?php echo "Main body". If the function does not succeed. Lab Work Page 12/18 MiEEC. 4. $d . read.uc. write and close files. 4.". Thursday 2nd June 2011. ?> </body> </html> Activity 13. 5:49:45 PM $d = date("l jS F Y.uc.int timestamp]) The first parameter is a string that allows specifying the display format.4 Accessing Files PHP has a set of functions to open.1 Functions fopen() and fclose() The function fopen() opens a file and returns a pointer that is usually stored in a variable. Try different formats. DEEC-FCTUC . 1 2 3 4 5 6 7 8 9 <html> <body> <?php // e.g. The example below calls twice function date().4. ".3 Function date() The function date() can be used to retrieve date and time in a configurable format.LAB1 – Introduction to PHP Databases The example below redirects the browser to the URL http://www. Edit and test this example (file: redirect.

weeks starting on Monday The year as a 4-digit number (e. 1 1970.g. 00:00:00. “0” otherwise Day of the month without a leading zero (1-31) The full name of the day (Monday-Sunday) “1” if the year is a leap year.g.g. nd. 1 fclose(<pointer>). DEEC-FCTUC . Option Description “am” or “pm” “AM” or “PM” Swatch Internet time (000-999) Day of the month with a leading zero (01-31) Three characters that represent the day of week (Mon-Sun) The full name of the month (January-December) The hour in 12-hour format without a leading zero (1-12) The hour in 24-hour format without a leading zero (0-23) The hour in 12-hour format with a leading zero (01-12) The hour in 24-hour format with a leading zero (00-23) The minutes with a leading zero (00-59) “1” if the date is in daylight saving time. “0” otherwise The month as number. “GMT”) The number of seconds since the Unix Epoch (Jan. 0=Sunday) ISO-8601 week number of year. 2 Jun. rd or th) The number of days in the given month (28-31) The local time zone (e. without a leading zero (1-12) The difference to Greenwich time (GMT) in hours An RFC 822 formatted date (e. with a leading zero (01-12) Three characters that represent the name of the month (Jan-Dec) The month as a number. Format options in function date(). Lab Work Page 13/18 MiEEC. “Tue. 2011 17:23:35 +0400”) The seconds with a leading zero (00-59) The English ordinal suffix for the day of the month (st.g. 09) The day of the year as a number (0-366) a A B d D F g G h H i I j l L m M n O r s S t T U w W Y y z The function fclose() is used to close a file which was previously open with fopen(). GMT) The day of week as a number (0-6. 2009) The year as a 2-digit number (e.LAB1 – Introduction to PHP Databases Table 2.

Read/Append. r r+ w w+ a a+ x x+ 4. respectively.txt". Read/Write. The file pointer is set to the end of the file if the file exists or creates a new file. $f = fopen($name. a file is open in read mode. the fopen() call will return an error. it is read and the number of characters read is displayed. 1 feof(<pointer>). while (!feof($f)) { $s = $s . fgetc() and fwrite() The function feof() accepts a pointer to a file and can be used to check whether the end of the file has been reached. Create and open for read/write. <character>). $name . Append. Read/Write. $s = "". fclose($f). If the file already exists. If the file already exists. otherwise creates it. echo "Contents of the file '" .LAB1 – Introduction to PHP Databases Table 3. 1 fgetc(<pointer>). " characters was(were) read.2 Functions feof(). Functions fgetc() and fwrite() can be used to."). if (!$f) exit("ERROR: Cannot open file. the fopen() call will return an error. $c=0. otherwise creates it. The file pointer is set to the beginning of the file. The file should have been open in the appropriate mode.4. DEEC-FCTUC . echo "<br /><br />" . Mode options in function fopen(). "r"). Create and open for writing only. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 <html> <body> <?php $name = "file. returning 1 (true) or 0 (false). $c . fgetc($f). ?> </body> </html> Lab Work Page 14/18 MiEEC. Both functions advance the file pointer. Write only.". The file pointer is set to the beginning of the file. The file pointer is set to the end of the file if the file exists or creates a new file. Either clears the file if the file exists or creates a new file. $c++. fwrite(<pointer>. } echo $s. Mode Description Read only. Either clears the file if the file exists or creates a new file. In the example below. read a single character from a file or write a single character to a file. "':<br /><br />".

Activity 16.php" method="POST"> Name: <input type="text" name="name" /> Age: <input type="text" name="age" /> <input type="submit" /> </form </body> </html> </body> </html> When the user clicks in the “submit” button. It is important to know how data can be automatically passed to a PHP script. Edit and test this example of a form (files: form. A function can only return one result. Creating functions It is possible to create new functions in PHP. </body> </html> Variables $_POST["name"] and $_POST["age"] are automatically defined by PHP. A function may accept parameters and return a result with 1 return <result>. If a complex result needs to be returned.LAB1 – Introduction to PHP Databases Activity 15.: Lab Work Page 15/18 MiEEC.g. Table $_POST contains every data sent through POST method of HTML forms. the PHP script welcome. Forms HTML allows defining forms to read data from keyboard. 1 2 3 4 5 6 <html> <body> Welcome <?php echo $_POST["name"].php). This feature makes scripts more modular and makes easier reusing PHP code. Edit and test this example (file: filesfun. ?> years old.php). The example below shows a HTML file with two text boxes to read data from keyboard.<br /> You are <?php echo $_POST["age"]. e. DEEC-FCTUC . 5. Parameters of a function are listed as an argument list. 6. ?>. an array can be returned.html and welcome. 1 2 3 4 5 6 7 8 9 10 11 <html> <body> <form action="welcome.php is executed. It is presented below an example of a script that processes data inserted in the previous form.

echo "The volume is equal to " .php.html"> <body> <?php require("computeVolume. $_POST["width"]. by using the function require().g. $y.. The example below calls the function computeVolume() defined in the external script named computeVolume. </body> </html> The parameters are read through the following form: 1 2 3 4 5 6 7 8 9 10 11 12 13 <html> <head> <title> Volume Computation </title> <body> <h1> Volume Computation </h1> <form action="callComputeVolume. headers and footers that are used many times in different scripts. ?> </br /> </br /> </br /> You will be redirected to the initial page in 3s. } ?> 6. e. return $vol.1 Inclusion of other scripts inside of a script It is possible in PHP to include a script (an external file) inside another script before the PHP server executes it. This possibility is often used to create functions. " m3.Redirects the browser after 3s --> <meta HTTP-EQUIV="refresh" content="5 url=volume. computeVolume($_POST["length"]. $arg2) The function is called through its name and listing the parameters.LAB1 – Introduction to PHP Databases 1 function myfun($arg1.. 1 2 3 4 5 6 7 <?php function computeVolume($x.php").".: 1 $result = myfun(4. 7). DEEC-FCTUC Lab Work .php" method="POST"> Length (m): <input type="text" name="length" /> Width (m): <input type="text" name="width" /> Height (m): <input type="text" name="height" /> Page 16/18 MiEEC. $_POST["height"]) . The example below defines the function computeVolume() which accepts three parameters and computes a volume. $z) { $vol = $x * $y * $z. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <html> <head> <!-.

1 Creating a Cookie – Function setcookie() The function setcookie() can be used to create cookies.<br />". Edit and test this example (files: callComputeVolume. the browser sends to the remote HTML server all the cookies stored in the local computer that are related with that server. Cookies A cookie is used to identify a user or some information about the user (e. ?> <html> <body> <p> A cookie was created in this page! It will be active for 1 minute. <path>. It is possible to create and access cookies in PHP. its name exists in PHP as an element of the array variable $_COOKIE.php.php and volume. "!<br />". The example below test whether cookie “username” exists and retrieves its value. computeVolume. <value>. DEEC-FCTUC .html). ?> Lab Work Page 17/18 MiEEC. preferences). Whenever the same computer sends a request of a web page. <domain>). It is usually included before the <html> tag. $nome. The function isset() can be used to check whether the cookie exists before trying to access it. time()+60). The example below creates a cookie named “username” which expires in 1 minute. 7. 1 2 3 4 5 6 7 8 <html> <body> <?php if ( isset($_COOKIE["username"]) ) echo "Welcome " . else echo "You are not registered in our system. </p> </body> </html> 7.2 Reading a Cookie – Function isset() Whenever a cookie is created. A cookie is a small file which the browser stores in the user‟s computer.g. $_COOKIE["username "] . with the following syntax: 1 setcookie(<name>. 7. 1 2 3 4 5 6 7 8 <?php setcookie("username". expiration_time.LAB1 – Introduction to PHP Databases 14 15 16 17 <input type="submit" /> </form </body> </html> Activity 17.

[3] PHP Function List.php. Last visited: May 30.13 14 15 16 17 18 10 20 30 40 50 60 70 80 100 10 10 10 10 10 10 10 10 20 helloworld.wikipedia. Choose the cookie expiration time to be 5 seconds in order to make easier testing the script. 2011.php Handout prepared by Rui P.html and welcome. DEEC-FCTUC .php Checklist Activity Progress (%) Description 1-3 4-6 7 .php computeVolume.php.php and today. Available: http://en.net Last visited: May 30. course on Electrical and Computer Engineering (MiEEC).Sc.php.php. forloop. phpservervars. callComputeVolume. in the scope of the Databases discipline of the M. Last visited: Jun. [Online]. 2011.php whileloop.php and foreachloop.10 11 . 2011. May 28.php and redirect.php phpinfo.php). concat.php. Create a script that counts the number of visits to the page based on a cookie (file: visits.LAB1 – Introduction to PHP Databases 9 10 </body> </html> Activity 18.net/quickref.php. Rocha (DEEC-FCTUC) on June 2011. * Lab Work Page 18/18 MiEEC.php.php and operators. Available: http://pt. whatnumber.org/wiki/PHP [2] PHP: Hypertext Preprocessor. [Online]. dowhileloop. the free encyclopedia.php. 2.php date. 2011.php weekday. Available: http://pt.html visits.php form. 2011.php filesfun.php and volume. [Online]. References [1] PHP – Wikipedia. 2011.