Page 1 of 1

easy php chat

Posted: Mon May 26, 2003 4:24 pm
by ampersand
I need to make an easy php chat? how can I start or go for tutorials on a chat ?
I don't wanna use a database but a text file..

Best Regards
R.A.

Posted: Mon May 26, 2003 11:55 pm
by RohanJM
Im not sure if this will help but if you are a flash developer it will.... there are a lot of chat tutorials on chat's made with Flash 'n' PHP at http://www.flashkit.com

Posted: Tue May 27, 2003 2:00 am
by []InTeR[]
Chat with php is simple,

You need 3 things.

A frameset with a 'output' and 'input' part.

The input part is go'ing to insert each line in a database.

The output part is go'ing to readout every line from the database.
In a never-ending while.....
Flush a lot......

Ready is your chat. (in theory).

Posted: Tue May 27, 2003 7:48 am
by ampersand
Thanks. I made a php last night, but there is a little problem!
How can I make emails and url to hyperlink when submitted to the chat window ?

Posted: Tue May 27, 2003 8:54 am
by sleepingdanny
You can try using: str_replace(" "," ") for this.
Or you can use: ereg_replace :P

Posted: Tue May 27, 2003 11:57 am
by ampersand
I'm using ereg_replace for emoticons but I'm not sure how to write it so it converts url's and mails to hyperlinks :? could you help me please ? :)

Posted: Wed May 28, 2003 7:01 am
by ampersand
This chat is not using a database, is that a problem when I want url to become hyperlinks ?

Posted: Wed May 28, 2003 7:27 am
by mikusan
It depends on how exactly are you using php, you are not going to get away with an echo('http://www.link.com');
instead (i don't know how you are using php) you would have to
$string = '<a href="http://www.link.com">Linkname</a>';
echo($string);

This is perfect if you are building a modular site, if instead you use *.html files with some <? //phpcode here ?> you would simply put the link in the html but wrap it around some kinda php function and a LOT of <? ?>...

Posted: Wed May 28, 2003 8:49 am
by ampersand
actually its rather a shoutbox, you can look at it here:

Shoutbox