<!-- 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)
20th 2021f April 2021
8:58:43: 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 (https://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

Faith is to believe what we do not see, and the reward of this faith is to see what we believe. -- Augustine