Jump to content

Archived

This topic is now archived and is closed to further replies.

skroks609

Php Chat Help

Recommended Posts

Ok so i only started Php last week and i barely get the basics. But I really want to make a php chat the way i need it to be. Its going to be a chat for my new game, so i would like it to have avatars, admin features(stuff like banning, different avatars, special warnings) and i really need auto-delete. I know I am asking for alot, but if you can do it, please show me how.

Thankyou, Curtis989  ;D ;D ;D

Share this post


Link to post
Share on other sites
I think u need to know the basics before taking on a task like that

Also

PHP is a server side language, It send its information and posts back

To build a chat you have several options
Refresh the page every second
Use Flash and PHP
Use Javascript and PHP

Share this post


Link to post
Share on other sites
Here is what I use. A basic idea


[b]The real page.[/b]

[b]--index.html[/b]

1. Has a banner
2. Has two <iframes> the top one stretchin 100% w and 60% h the one below 100% w and 20% h
3. First iframes=dis.php
4. Second iframe=add.php


[b]Display page[/b]

[b]--dis.php[/b]

1. Refreshes every 5 secs
2. Reads a file chat.txt
3. Formats it and displayss the contents


[b]Add page[/b]

[b]--add.php[/b]

1. Has a name feild on top, which has the contents of the cookie name.
2. Has a message box.
3. Once submitted it sets a cookie name with the value of name.
4. writes to file chat.txt, the name and message.


This helps a lot for one can write while still being able to see whats going on.
If you had the same page having to refresh which has the display and add thing, it would not work good.
You can also add smily support which is not @ all difficult

[b]Note: This is an example of a PHP chat.[/b]

Share this post


Link to post
Share on other sites
Well that way you have a whole database of chat systems at hotscripts.

Share this post


Link to post
Share on other sites

×

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.