Quote Originally Posted by Nightwalker83 View Post
Why do you need the program to interact with php? Visual Basic 6.0 can communicate with the database on its own.
Nobody with any sense exposes a database to direct connections across the Internet, and for that reason many hosting providers do not allow it.


From the looks of things your PHP script returns JSON results. So in addition to using an HTTP client library you will need at least a JSON parser, and if you post updates a JSON serializer too.

VB6 has a plethora of choices when it comes to making HTTP requests:

  • AsyncRead method. Built into VB6, but can only do GET requests.
  • Internet Transfer Control (INet). Aging and somewhat clumsy VB6 OCX.
  • XmlHttpRequest object. Part of MSXML, supported as far as back Win95 with IE 4.x installed and built into Windows from at least Win2K onward.
  • WinHTTPRequest object. Part of Windows since Win2K SP3.


Or you can cobble something up from WinInet API calls or buy a 3rd party library. But with so many "free" and reliable alternatives why bother?


As for examples, there are tons of them on the Web. But most of them are either trivial cases, outright junk, or otherwise ignore numerous factors. In particular you need to worry about cache control on GET requests, async operation to avoid program freezing, request timeout handling, error handling, and request authentication issues.