I don't think making the bot in PHP would be a very good idea. Most mIRC users don't know how to run PHP. What would make sense is to install this on a shared web host and create an mIRC client that can be configured to connect to it and pass information. But the PHP code should recieve the updates after the client authenticates. Best not to allow the client to update mysql directly.