FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!

Visitor information




Description

Displays information about a visitor to a web page. Shows IP address, referrer and browser type.


The code


Code:
<?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>";



?>

Smile



0 blog comments below




FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.