How To Setup a Fake IRC Server with phpFreeChat
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.
(By) Jason K is a student who enjoys video games and wasting time. He writes at his own weblog, Third Error.



i know this is kindof offtopic, but what firefox theme is that?
Default Firefox theme on XP. I use Hide Menubar to hide the top menu bar.
I like that makeuseof.com is getting a little bit more technical
Didn’t worked … After the Install Step It says ” failed to create directory ” and Exits ..
Does the directory already exist? It has to be a new directory.
I have just made a admin params.
) Then every time me writed : Identification faliure.
But when i try insert /identify mypassword ( mypassword is my password
What’s the exact line for your admin and password from the config? Make sure you’re typing whatever is in quotes exactly.
I get the same failure. I copied and pasted your line of code and just replaced with my own name and password. No matter what I try, I get a failure.
(Comments wont nest below this level)Use the correct quotes
$params['admins'] = array(”username” => “password”);
Does the directory already exist? It has to be a new directory
Hi im having the next problem
Adding directory: / ……………………………………….[failed]
>> Failed: could not make directory / Exiting…
the directory path does not exist though it stills giving me this error, any solution?
make sure your install path is right, do not use the original path ,you see the pic http://www.makeuseof.com/wp-content/uploads/2009/02/install_2b.png the path is E:xmpp/**/** chang it by yourself
i like this chat , ubuntu?!
Why remove flood protection? Doesn’t it exist to prevent users from flooding with malicious scripts?
Does keeping flood protection also prevent the admin from running macros? And on that topic, does this chat program support macros like IRC does?
Im going to use phpfreechat but i find it hard to install
yeah … it’s hard to install
At what point is it hard to install?
If phpfreechat doesn’t quite fit the bill, you can always try various other chat applications.
Hi,
I have a question about this app. By fake IRC server, do you mean, it is similar to an IRC server, but is not one? And would I be able to run an existing IRC bot against this server, in that case?
Thanks,
elgee
Yes, it is similar to an IRC server but it is not one. So, no, you would not be able to run an existing IRC bot.
Oh ok, thanks for the clarification
elgee
I am trying to link my PHPFreeChat to our Mysql Database to ensure that only registered users can use out chatroom. HELP!
ALL I want to do is to link to our SMF User database.
CODE:
Truckin’ Bozo’s Chat!
NOTE:
If you are inactive for five minutes you will be auomatically logged off. To log back on, in the command line type:
/connect YOURUSERNAME
SPONSORS
The People’s Journal
SS Travel Corporation
Help Section
Useful Links
printChat(); ?>
I Tried to put my code in the post. Please refer to the link to see the code.
Click Here
Thanks
plz help i uploaded the setup file but when i go to the url there is a white page