Not sure that your question has that much to do with mIRC,
unless you've scripted a web server with mirc.

If you're using apache or other http server that supports PHP.

See this http://uk2.php.net/manual/en/function.ircg-pconnect.php

I've never used it before though, unsure how it works