Page 2 of 2

Re: Flat File Based Chat Help

Posted: Sat Nov 03, 2012 2:51 pm
by pHp_n0ob
twinedev wrote:Browsing to http://topz.iwebs.ws/priyanka/Love.txt (the content of the file you are trying to display backwards) shows:
<--- WWW.WAPFTP.BIZ --->
TestingTesting2Testing3
Going to the test site you gave saying it isn't reversing it is giving:
TestingTesting2Testing3<--- WWW.WAPFTP.BIZ --->
So the "TestingTesting2Testing3" line (which is the second line in the text file) IS displaying before the "<--- WWW.WAPFTP.BIZ --->" line (which is the first line in the text file).

So it is working, you just are not putting each item on it's own line, you need to do $msg."\n" when writing the data to the file. Also you need add some <BR> or whatever you want to use between each line like:

Code: Select all

$output = $line."<br>\n".$output;


BTW, since this will be for a "chat", I would assume that this page will update often so people can see the latest replies. Say you have 10 people in chat, and you do one update per second, that is 600 page calls PER MINUTE, do you really need two different sites tracking all 600 calls per minute? (on top of the is 600 times a minute the text file will read... 600 times per minute that the apache log files will have to update... this is why HTTP based chat is so wasteful)

-Greg
I didnot understood...please clearify :-(

Re: Flat File Based Chat Help

Posted: Sat Nov 03, 2012 10:03 pm
by twinedev
which part?

Re: Flat File Based Chat Help

Posted: Thu Nov 08, 2012 8:52 am
by pHp_n0ob
twinedev wrote:BTW, since this will be for a "chat", I would assume that this page will update often so people can see the latest replies. Say you have 10 people in chat, and you do one update per second, that is 600 page calls PER MINUTE, do you really need two different sites tracking all 600 calls per minute? (on top of the is 600 times a minute the text file will read... 600 times per minute that the apache log files will have to update... this is why HTTP based chat is so wasteful)

-Greg
This one