PHP Samples
These are a few of my favorites:<?php // print out the dateWhich will display this: (hint: Use the drop down to adjust for your timezone)
$getdate = date( "dS of F Y" );
$gettime = date( "g:i:s: A", time() + $zone=3600* );
PRINT "$getdate<br>";
PRINT "$gettime";
?>
20th 2021f April 2021
8:58:43: PM
<?phpWhich will display the folowing info:
echo "Referer: " . $_SERVER["HTTP_REFERER"] . "<br>";
echo "Browser: " . $_SERVER["HTTP_USER_AGENT"] . "<br>";
echo "User's IP address: " . $_SERVER["REMOTE_ADDR"];
?>
Referer:
Browser: CCBot/2.0 (https://commoncrawl.org/faq/)
User's IP address: 3.235.41.241
<?phpWhich will display the following random quotes.
$quote[0]="Quote 1";
$quote[1]="Quote 2";
$quote[2]="Quote 3";
$quote[3]="Quote 4";
$quote[4]="Quote 5";
$randnum=mt_rand(0,4);
echo $quote[$randnum];
?>
{hint - make sure you change (0,4) to however many quotes you use ie. (0,11)}
Quote 4