*Clears throat*
All these replies and half of them aren't even correct. First of all, it doesn't have to take alot of mIRC scripting skill to implement a script like you're talking about. As usual, don't listen to Equinox, he's bad for you.
There are a two main approaches for something like this.
1) Probably the best way: Create a .dll to the standards required to load it via mIRC. This .dll is where the query/network functionality will be located. It can be coded in whatever language, so long as it can be compiled into a .dll. I have released the C++ source code to HSQT on my site and you _could_ use the query function from there in your own .dll. Once you've got the .dll error-free and compiled, then you'll need to create a SIMPLE mIRC script that just contains a few aliases to query the server, display the information or whatever else you want. These aren't real mIRC functions, they just an alias to call the appropriate function in the .dll. This is by far the fastest way to query servers.
2) Waste your time using mIRC's scripting language to try to achieve the same effect. Even if you succeed, its performance will suck compared to the above method.
There are a few other ways in which it could be done differently, but they are more complicated and not really worth the effort.
BTW: You can find that PHP Query script at:
http://www.the-junkyard.net/files-halo. ... erby=alias