php

New Project : Oil Price in Iceland

2 months ago I decided to act on an idea that had been floating around in my cranium for a long time.  It sounded simple enough,  gather all the data pertaining to the price of oil in Iceland in one location and present it on a simple front end.  However once I started working on it and the ball was rolling I learned it wasn't as simple as I thought it would be.  So during these past weeks I have learned a lo

PHP Code to show the user-agent value

  1. // this is very simple code that displays the user's current user-agent string.
  2.  
  3. <html>
  4.  <head>
  5.   <title>
  6.    What's your user-agent
  7.   </title>
  8.  </head>
  9.  <body>
  10.   Your User-agent is :<br>
  11.   <?php
  12.    $strUseragent = getenv("HTTP_user_agent");
  13.    print($strUseragent);
  14.   ?>
  15.  </body>
  16. </html>
  17.  
  18. // This would output something like this:
  19. // Your User-agent is :
  20. // Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4
Syndicate content