mIRC can augment another language like PHP if you use files and timers in a clever (and cpu consuming) way. PHP has its limits, though it is fuggin awesome. You can have PHP write something to a file, telling mIRC what to do and then wait for the file to change. Use a timer that checks often to look at the file...
Anyway, before I get too ahead of myself and actually try to make something as godawful as that.. I think it would probly have something to do with sockets. Basically, a socket script that accepts connections on port 80 (the usual webpage port), checks certain info (the browser sends several lines to the webpage it connects to, such as GET <file> to retrieve a specific file) and then uses a /sockwrite to write back to the browser.
All things considered, seems like this method is not too great, since mIRC has to be loaded and it is slower than a webserver in C++. You get to brag about making your own webserver though, and you can add what features you want and not have to pay. Maybe its something I should consider, actually....
If you want to find out the kind of stuff your browser and a server send back and forth, get a packet viewer. Something like 'CommView', but that doesn't cost money. A program that just intercepts and reads packets shouldn't cost money, but I'm too lazy to go find another one, and I don't use it anymore anyway.