If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

php and irc

hello all

i have a small irc server that im currently testing... going to use it for my friends in town
i already found a perl client that i have installed on my website... cgiirc and it works great... but im trying to figure out if i can make or find a php script that can show if i have users in my chatroom and if the server is even running

i tried searching google but i cant find anything that can teach me how to creat a simple one

i would like to learn how to use php.. not just copy and paste some code and call it quits

I understand you would like to gain experience on both php and irc, by
making your own irc-"library" in php, e.g. by writing a bot - which actually
can be quite funny

IRCP[1] talks over TCP/IP, hence it is natural to use the fsockopen()[2]-command
to initiate a connection to your IRC server. The handle can be used as any other
file handle ie. send with fputs and receive with fgets. Terminate the connection with
fclose.

I recommend you this nice little tutorial[3], which will get you started. Once you
have the idea, you "simply" need to implement the parts of the IRCP RFC you are
interested in. To answer the two of your questions: the server is running if you
can connect to it , you obtain the nickname-list by using NAMES, as specified in
4.2.5.