MBPC version 1.0
Martin Bredesen's Php Chat!
This script can be used free of charge if you leave the link back to my site.
To download the latest version of this script go to my homepage
www.bredesen.dk
Requirements:
PHP 4.3.10 or higher
For the full experience the clientside should have javascript enabled
Client must be able to view frames
Features:
- very easy setup, no coding skills is necessary
- fast loading
- no database req, uses flat text file to store data
- requires the user to provide a username before chatting
- uses sessions to store username and IP adress
- shows whenever someone logs in or out
- shows timestamp and IP adress of the user
- fully customizable with css, to match the design of your site
- XHTML compatible
- Only formatting HTML tags are enabled in messages only for a more colorfull chat, can be changed in the config file
- easy resetting of chatlog file
- field focus using javascript
- easy changing of charset to your default language
- and a clean and simple interface
Setup:
- unzip all files to it's own directory
- edit the variables in config.php
- upload the files to your server
- CHMOD chatlog.txt to 666 or write permissions
And your'e done
point your browser to the index.php file on your server and start chatting
Guide:
- To reset your chatlog just point your browser to:
http://www.YOURDOMAIN.COM/CHATDIRECTORY/reset.php
and type the password you created in config.php
- If you don't want search engines to index your chat, open it in an external
popup.
<script type="text/javascript">
<!-- Begin
function chat() { window.open ("http://www.yoursite.com/chatdirectory/index.php",
"Chat","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=400,left
= 337,top = 209"); }
// End -->
</script>
The above code should be placed in the head section of your page
And this is the link to open the chatroom
<a href="javascript:chat()">Open my chatroom</a>
- To change the appearance of the chat use these id tags in your style sheet
for the text input use #mbpctxt
for the buttons use #mbpcbtn
for the messages use #mbpcmsg
Changelog:
1.0 2005-03-12: First working version with sessions and login