Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv18838
Modified Files:
testfile.php
Log Message:
Index: testfile.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/testfile.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** testfile.php 4 Aug 2003 00:48:37 -0000 1.41
--- testfile.php 4 Aug 2003 04:34:32 -0000 1.42
***************
*** 1,2 ****
<?php
! ?>
--- 1,16 ----
<?php
! $sock = socket_create(AF_INET, SOCK_STREAM, 0);
! $connection = socket_connect($sock, 'irc.freenode.net', 6667);
!
! socket_write($sock, "USER TestBOT TestBOT TestBOT :TestBOT\r\n");
! socket_write($sock, "NICK TestBOT \r\n");
! socket_write($sock,"JOIN #binaryphp \r\n");
! while ($data = socket_read($sock, 2046))
! {
! $temp = explode(':', $data);
! $temp2 = explode('!', $temp[1]);
! $temp3 = explode(' ', $temp2[1]);
! if(strpos('TestBOT: PING?', $temp[2]) !== false)
! socket_write($sock, 'PRIVMSG ' . $temp3[2] . ' :' . $temp2[0] . ": PONG!\r\n");
! }
! ?>
\ No newline at end of file
|