Browser and OS Detector using PHP and Javascript
I recently ran into a customer who was having trouble accessing one the websites that I run. After checking the site and not being able to replicate any of the issues that she mentioned, I asked her to give me some details about her os and browser. Her reply was, “Windows and Internet Explorer”. That’s not really helpful is it? Which Windows are we talking about? Which version on IE?
So, I could email her back and ask her for specifics. But if she’s an average user, she’s probably doesn’t want to spend the time to figure out how to do that. After all, she’s already frustrated that she can’t access the site properly. So, I decided I would look for a php/javascript script that she could access from her computer. I needed her to be able to easily run it and then copy and paste the results to me in an email.
I came across a script that would work for me. However, the developers of the site are obviously just that…developers. They don’t mess around with design or give very nice directions on how to use this script, which is fine, but not for the average developer Joe. Maybe it’s an indictment on my abilities, but I struggled with it…alot. So, I thought I would help out by making it a bit more plug and play.
All credit is due to the developers who made the script. I have done nothing to alter the function of the code. I did, however, add some html for the sake of formatting and running the script in a “strict” environment. Credit is given within the script document.
Step 1: Download Zip File
Step 2: Unzip and upload contents of zip to a folder on your server (I named my folder “support”)
Step 3: Navigate to “your_computer_info.php” file (e.g. http://your-domain.com/support/your_computer_info.php)
That’s it. You should now see the specs of your OS and Browser. Your customer can copy and paste this in an email to you so you know how to troubleshoot your website.
Original Script Source: techpatterns.com
Leave a Reply