1

Topic: Visitor information

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

The 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>";

?>