Of course this won't work in mIRC, it's PHP. :|
Okay, i've got this connected to a server and modified it according to this snippet so I can easily make it respond to commands: http://www.hawkee.com/snippet/6223/
However, the ping does not seem to be working. Can anyone help me on this? Code: http://pastebin.com/m44c64848