Simple IRC Bot in PHP - DEMO page:

So in case you don't know what this is about, you can read my article about it. This is a PHP bot that sends messages to an IRC client.

For this example I am using one of the frihost.com IRC channels (Server: irc.dal.net Channel: #frih).

You can also download a zip file with the source code (3kb)

// Connection variables
$host = "irc.dal.net";
$port=6666;
$nick="demoTester";
$ident="DemoTester";
$chan="#frih";
$readbuffer="";
$realname = "Demo Tester";
Post a message:

 

Take into account that this bot takes a long time to post a message, so please be patient, it will take at least 5 minutes!

IRC channel stats:

To see your message posted on the IRC channel, I have inserted here in an iframe the channel stats. If you don't see your message posted in it after sending it, wait a few seconds and reload the page (Without resending the message!)

To view older channel stats, visit the #frih IRC logs

This demo page was programmed and designed with the aim of helping understand the original article. You may not use it to spam or introduce harasing comments in the IRC channel, which would end up in this being closed.

If you find a way to improve this script, make it faster or safer, let us know in the comments of the article. Thanks for your support