Jump to content


Photo

Php Chat Help


  • Please log in to reply
4 replies to this topic

#1 skroks609

skroks609
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 13 August 2006 - 12:11 PM

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
All windows computers will crash in 2057
Or will they??...

#2 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 13 August 2006 - 01:36 PM

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
Tell me the problem, I will try tell you the solution

#3 Chetan

Chetan
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts
  • LocationIndia

Posted 13 August 2006 - 01:57 PM

Here is what I use. A basic idea


The real page.

--index.html

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


Display page

--dis.php

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


Add page

--add.php

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

Note: This is an example of a PHP chat.
I am a PHP Guru, ask me questions if you want to

#4 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 13 August 2006 - 02:25 PM

OR:

You can download phpchat
Tell me the problem, I will try tell you the solution

#5 Chetan

Chetan
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts
  • LocationIndia

Posted 14 August 2006 - 09:05 AM

Well that way you have a whole database of chat systems at hotscripts.
I am a PHP Guru, ask me questions if you want to




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users