<?
/* change it to your own nickname */
$nickname = "testBot901";
/* choice your irc server */
$server = "irc.quakenet.org";
/* change to your channel */
$channel = "#hellwolf";
/* do not change it if you do not know what means

*/
$port = "6667";
/* as ircg cannot resolve hosts, we use PHP internal function to get the IP */
$ip = gethostbyname($server);
/* connection */
$id = ircg_pconnect($nickname,$ip,$port);
/* checking if connected */
if (!ircg_is_conn_alive($id))
{
print "Cannot connect<br>";
exit;
}
/* joining a channel */
if (!ircg_join($id,$channel))
{
print "Cannot join to $chanell<br>";
}
/* getting messages - you must have this in your php file */
ircg_set_current($id);
/* send messages to your channel and you */
ircg_msg($id,$channel,"Hello $channel!!");
ircg_msg($id,$nickname,"This message goes to me!!!");
?>