23
May
<?php
// Insert this block of code at the very top of your page:
$time = microtime();
$time = explode(” “, $time);
$time = $time[1] + $time[0];
$start = $time;
// Place this part at the very end of your page
$time = microtime();
$time = explode(” “, $time);
$time = $time[1] + $time[0];
$finish = $time;
$totaltime = ($finish - $start);
printf (”This page took %f seconds to load.”, $totaltime);
?>
23
May
<?php
/**
* Add this line of code in your page:
* <?php include “visitor_information.php”; ?>
*/
// Display IP address
echo “<p>IP Address: ” . $_SERVER[\'REMOTE_ADDR\'] . “</p>”;
// Display the referrer
echo “<p>Referrer: ” . $_SERVER[\'HTTP_REFERER\'] . “</p>”;
// Display browser type
echo “<p>Browser: ” . $_SERVER[\'HTTP_USER_AGENT\'] . “</p>”;
?>
23
May
<?php
// Change to the name of the file
$last_modified = filemtime(”thisfile.php”);
// Display the results
// eg. Last modified Monday, 27th October, 2003 @ 02:59pm
print “Last modified ” . date(”l, dS F, Y @ h:ia”, $last_modified);
?>
23
May
<?php
/**
* Place in a blank PHP page
*/
// Change to the URL you want to redirect to
$URL=”http://www.example.com”;
header (”Location: $URL”);
?>