Internet Relay Chat. One of the early forms of communication on the Internet, IRC featured a very basic chat protocol. While Tim has explored creating an individual IRC channel, we’ll be creating a fake IRC server using phpFreeChat, which allows you to create separate “channels” and various other features reminiscent of IRC (though certainly not as advanced). You’ll need a web server with PHP.
Installing phpFreeChat
- Grab the latest phpfreechat-x.x-setup.php at Sourceforge (1.2 is the latest version at the time of this writing).
- Upload it or move it to a local web server directory. We’re going to be using a XAMPP installation, so we’ve moved it to the root directory. You don’t want to put the install file where you want the chat to be.
- Navigate to the file. Our URL would be http://localhost/phpfreechat-1.2-setup.php. You’ll be greeted with a Pre-Install Check. Hopefully it looks like the picture below. Hit ‘Next’.
- You’ll be prompted for an install path. By default it creates a phpfreechat directory in the current directory, but you can change it to whatever you wish. Hit ‘Next’.
- It’ll ask you to confirm the install. Click ‘Next’. Watch the pretty progress bar. Once it’s finished, click ‘Next’.
- It’ll have installed itself in the directory of your choice, ours being http://localhost/phpfreechat/. Do as it says and delete the phpfreechat-x.x-setup.php file.


Quick Configuration
Setting up the Admin Account
The equivalent of an IRC channel op, the admin password allows you to gain access to privileges such as kicking, banning, and viewing user IP addresses. Admin status is global across all channels.
$params['admins'] = array(‘username‘ => ‘password‘);
Replace username with the desired username, and password with the desired password.
$params["isadmin"] = true; // do not use it on production servers
![]()
Prompt for Nickname Upon Entry
By default, the chat assigns you a nickname guest followed by random numbers. To force the user to choose a nickname when they enter:
$params["nick"] = “guest”.rand(1,1000); // setup the intitial nickname
Save the file.
Remove Censor and Flood Protection
$params['skip_proxies'] = array(‘noflood’,'censor’);
Save and rehash the chat.
Final Notes

Important Commands
- /nick username – Change your username to username
- /identify password – Gives you admin rights, given the right username and password.
- /op username - Gives username admin rights.
- /kick username reason – Kicks a username with a given reason.
- /join room – Joins room “room”. If it doesn’t exist, it’s created.
- /help - Your best friend.
The Basics
- A list of the rooms you’re currently in is shown as tabs at the top of the chat, click to switch rooms (equivalent of IRC channels). You can create new ones using the aforementioned /join command.
- You can view the IP address and an option to private message a user by clicking on their name in the list.
- Explore around. You can find phpFreeChat documentation on their website.
Do you prefer to use any other IRC-type chat software for your website? If so, recommend it to us in the comments. Or if you have any problems setting this up, leave a question and we will try to help you.
Tagged: chat • irc • self-hosted • webmaster tools