Jump to content

Basic PHP IRC bot?


Daktyl198

Recommended Posts

I'd like to start off by saying that I'm pretty much a newbie when it comes to PHP. I've had more experience in it than any other scripting/programming languages though, so I wish to use it for my needs.

 

I've been googling away for the past two weeks or so trying to find a basic PHP IRC bot script that can connect to an IRC server, pass a ping/pong, and join more than one channel.

I'd also like the functions to be modular (in a ./commands folder or something).

 

But even with all that googling I don't know what to do. I've only come across older scripts that don't mention PING at all (not to mention that none of them can seem to agree on how to actually connect to the server [sockets_connect vs fsocketopen] and how to do things after [fswrite vs fsputs])

 

So I come asking for help with a very, very basic script that will pass a PING/PONG, be able to join more than one channel, and that can load !trigger or .trigger functions from single-file .php modules in a subfolder. Even if I somehow figure out to connect and join channels, the "read each line in the channel and load modular triggers and functions" part is probably way out of my league :(

Link to comment
Share on other sites

Which function should I use to connect to the server [sockets_connect vs fsocketopen], which function I should use after to send data to the server [fswrite vs fsputs], and how to pass a PING/PONG test.

 

Those three pieces of info should send me on my way :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.