Simple chatbot for IRC written in PHP
$server = "irc.example.com";
$port = "6667";
socket_write($sock, "NICK JOHN \r\n");
socket_write($sock, "USER JOHN JOHN JOHN :john\r\n");
socket_write($sock, "JOIN #CHANNEL\r\n");
$servername = "localhost";
$username = "root";
$password = "PASSWORD";
$dbname = "DATABASE";