Home | Scripts | Tutorials | Books | Hosting | Forums | Links|

Navigation:

Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links






 
 

SPONSORS



 
 

Log Browser Info

In this example we are going to log the browser info and store it on another page this is useful for webmasters to see what the majority of users browsers are and then they can make decisions on how this affects their site . This page includes the script and we have included a link to the page so you can see all entries.

You will have to create a page to store this info and display it we have called ours httpuseragent.htm , you have to ensure that the file attributes of this page are such that you can read and write to it . I set mine to chmod777 using CuteFTP.

See browser info


Here is the script

<?php
//open web page for appending
$fp = fopen("httpuseragent.htm" , "a");
//put the user agent info onto the page
fputs($fp , "$HTTP_USER_AGENT<br>");
//close file
fclose($fp);
?>