IRC Chat website

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rapaddict_dot_com
Forum Commoner
Posts: 27
Joined: Tue Mar 16, 2004 4:54 pm

IRC Chat website

Post by rapaddict_dot_com »

How can I set up a website which says "x amount of users currently chatting on this network (x guests, x members), x users registered."

and also it has a forum you can full out and it registers your username on the irc network and also a forum where you can login and identify to a username then connect to the network.


Can this be done?

~cheers
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Yes, it can be done. What you have to do is write a script that stores whoever is logged in, into a text file or database. You will also need to use a timestamp field to track when the users last activity was. With that timestamp, you can program your script to delete users from the logged in database or textfile who have not accessed a webpage or sent any text message for x amount of time. (i.e. 20 Minutes)

As for your second question, I dunno. I am not familar with those protocols.
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

You can just create a simple bot script that connects to the IRC server grabs the number of users online every so often, and then can register accounts when needed.
rapaddict_dot_com
Forum Commoner
Posts: 27
Joined: Tue Mar 16, 2004 4:54 pm

Post by rapaddict_dot_com »

and is there an example of some basic code for that? :) and maybe a mock up rego script
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Check http://www.redvodkajelly.com/code/5 and then to register a user you just need to send:

Code: Select all

PRIVMSG nickserv :REGISTER email password
Etc. Its just a case of connecting to the server and then issuing commands as you would do on any IRC program.
Post Reply