Php Browser Detector

Php Browser Detector

Php Browser Detector

Every programmer involved with the Internet will be aware of Ajax (Asynchronous Javascript and XML), but they may not realize that the techniques involved are not limited to Javascript alone - the techniques can also be used, for example, with VBScript; and this raises an interesting possibility - the ability to use the Ajax technique to create a Windows Desktop application.

All that's needed for the Ajax technique to work with VBScript is:

  • VBscript to be installed (but fortunately that comes as standard on every Windows pc)
  • the XML HTML request object to be installed (again that's built into every Windows computer)
  • a server script (on an web or network server)
  • a VBScript that will send data to the server and then process the data returned by it

In this example:

  • a PHP script on the server will take a company acronym as an input and return the current stock quote from Yahoo! Finance
  • the VBScript code will call the PHP script on the server and then display the result

The first step, therefore, is to set up the PHP script on the server.