PHP : Visitor Information

3 Mar

<?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>”;

?>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: