<!-- Home|Web Hosting/Design ->
<!--PHP Code-->

PHP Samples

These are a few of my favorites:
<?php // print out the date 
$getdate = date( "dS of F Y" );
$gettime = date( "g:i:s: A", time() + $zone=3600* );
PRINT "$getdate<br>";
PRINT "$gettime";
Which will display this: (hint: Use the drop down to adjust for your timezone)
17th 2017f October 2017
1:45:01: PM
echo "Referer: " . $_SERVER["HTTP_REFERER"] . "<br>";
echo "Browser: " . $_SERVER["HTTP_USER_AGENT"] . "<br>";
echo "User's IP address: " . $_SERVER["REMOTE_ADDR"];
Which will display the folowing info:

Browser: CCBot/2.0 (http://commoncrawl.org/faq/)
User's IP address:
$quote[0]="Quote 1";
$quote[1]="Quote 2";
$quote[2]="Quote 3";
$quote[3]="Quote 4";
$quote[4]="Quote 5";
echo $quote[$randnum];
Which will display the following random quotes.
{hint - make sure you change (0,4) to however many quotes you use ie. (0,11)}

Quote 4

What if the families turned to Jesus and stopped asking Oprah what to do? -- Casting Crowns from the song What if His people prayed?