Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Browser Type
#1
Find out what type of browser and their computer details are with this simple PHP script which informs you of your visitor Browser details. This is good information so you can improve your website for a more targeted audience.

This is a simple script which will allow you to see what type of browser your website visitors are using. This can give you a better idea of your target audience.

PHP Code:
<?php
/*****************************************************
         ** Filename.....…...: vistorcheck.php
         ** Package Name.....: Free Version
         ** Client ..........: N/A
         ** Specification No.: SVWD-0005
         ** Author..….....…..: Virtual Web Designs (Webnetics UK Ltd.)
         ** Contact.....….…..: support@vwdesigns.co.uk
         ** File Version.....: 1.0
         ** Date .......……...: 12/04/2008
         ** Change No.. .....: N/A    
         ** Last Changed ....: N/A
         *****************************************************/
## GET THE DETAILS
$date=(date("F j, Y"));                      ## Current date

$time=(date("H:i:s"));                       ##  Current time
$IPnumber=getenv("REMOTE_ADDR");             ## IP Number assigned to your DUN
$Browser=$_SERVER["HTTP_USER_AGENT"];        ## Browser agent
$ReferURL=$_SERVER["HTTP_REFERER"];          ##  Refferal URL
$ServerName=$_SERVER["SERVER_NAME"];         ##
$ServerSoftware=$_SERVER["SERVER_SOFTWARE"]; ##
?>

<html>
    <head>
        <title>Visitor Browser Check</title>

        <meta http-equiv = "Content-Type" content = "text/html; charset=iso-8859-1">
        <style type = "text/css">
            <!--

            P
                {
                font-family: Arial, Helvetica, sans-serif;
                font-size: 11px;
                font-weight: BOLD;
                }

            P.text
                {
                font-family: Arial, Helvetica, sans-serif;
                font-size: 13px;
                font-weight: NORMAL;
                }

            A
                {
                font-family: Arial, Helvetica, sans-serif;
                font-size: 13px;
                font-weight: NORMAL;
                color: #000099;
                }

            INPUT
                {
                FONT-SIZE: 11;
                FONT-FAMILY: Verdana;
                COLOR: #ffffff;
                BACKGROUND: #a19797;
                CURSOR: HAND;
                }

            H1
                {
                font-family: Arial, Helvetica, sans-serif;
                font-size: 20px;
                font-weight: NORMAL;
                }

            -->
        </style>
    </head>

    <body>
        <h1>Visitor Browser Check</h1>

        <br>
        <p>
        <?php
        
if (isset($_POST["op"]) && ($_POST["op"] == "visitorcheck"))
            {
            print 
"<table width=\"700\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" BGCOLOR=\"#CCCCCC\">";
            print
                
"<tr><td width=\"125\" BGCOLOR=\"#F3F3F3\"><p>CURRENT DATE:</p></td><td BGCOLOR=\"#FFFFFF\">
<p class=\"text\">
$date <i>at</i> $time</p></td>
</tr><tr>
<td BGCOLOR=\"#F3F3F3\"><p>YOUR IP NUMBER:</p></td><td BGCOLOR=\"#FFFFFF\">
<p class=\"text\"><a target=new href=\"http://
$IPnumber\">$IPnumber</a></p></td>
</tr>
<tr> 
<td BGCOLOR=\"#F3F3F3\"><p>SERVER NAME:</p></td><td BGCOLOR=\"#FFFFFF\"><p class=\"text\">
$ServerName</p>
</td></tr>
<tr> 
<td BGCOLOR=\"#F3F3F3\"><p>SERVER SOFTWARE:</p></td><td BGCOLOR=\"#FFFFFF\"><p class=\"text\">
$ServerSoftware</p>
</td></tr><tr> 
<td BGCOLOR=\"#F3F3F3\"><p>YOUR BROWSER:</p></td><td BGCOLOR=\"#FFFFFF\"><p class=\"text\">
$Browser</p>
</td></tr>
<tr><td BGCOLOR=\"#F3F3F3\"><p>PAGE REFERRER:</p></td><td BGCOLOR=\"#FFFFFF\">
<p class=\"text\"><a href=\"
$ReferURL\">$ReferURL</a></p></td></tr>
</table>
"
;
            }
        
?>
</p>

        <br>
        <p align = "center">
        Click the button below to see your Browser Statistics:</p>

        <form method = "post">
            <input name = "op" type = "hidden" value = "visitorcheck">
            <input type = "submit" value = "Click here to check your details">
        </form>

        <br>
        <br>
        <p align = "center">
        Software by <a target = "new" href = "http://www.vwdesigns.co.uk">Virtual Web Designs</a></p>
    </body>
</html> 
Support
Virtual Web Designs
Reply


Messages In This Thread
Browser Type - by webnetics - 27-04-08, 11:52 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)