Re: [PHP] chat facebook
2011/2/19 fakessh @ fake...@fakessh.eu: anyone have a recipe for it on facebook chat a recipe for what? and I request a second thing how to install PHP API you're going to have to be more specific than that. - BW -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chat facebook
I'm looking script already written to facebook chat. I think it must already exist free applications for facebook chat many return are welcome Le samedi 19 février 2011 à 18:55 -0500, Brian Waters a écrit : 2011/2/19 fakessh @ fake...@fakessh.eu: anyone have a recipe for it on facebook chat a recipe for what? and I request a second thing how to install PHP API you're going to have to be more specific than that. - BW -- gpg --keyserver pgp.mit.edu --recv-key 092164A7 http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x092164A7 signature.asc Description: Ceci est une partie de message numériquement signée
Re: [PHP] chat facebook
I just install jaxl [1] http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/ and echobot.php and I test a connection with facebook. and oddly despite changes in the code echobot.php I can not make a connection to the facebook chat with the correct authentification Le dimanche 20 février 2011 à 02:11 +0100, fakessh @ a écrit : I'm looking script already written to facebook chat. I think it must already exist free applications for facebook chat many return are welcome Le samedi 19 février 2011 à 18:55 -0500, Brian Waters a écrit : 2011/2/19 fakessh @ fake...@fakessh.eu: anyone have a recipe for it on facebook chat a recipe for what? and I request a second thing how to install PHP API you're going to have to be more specific than that. - BW -- gpg --keyserver pgp.mit.edu --recv-key 092164A7 http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x092164A7 signature.asc Description: Ceci est une partie de message numériquement signée
Re: [PHP] chat facebook
2011/2/19 fakessh @ fake...@fakessh.eu: I just install jaxl [1] http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/ and echobot.php and I test a connection with facebook. and oddly despite changes in the code echobot.php I can not make a connection to the facebook chat with the correct authentification Then ask in their forums. Just because it's written in PHP doesn't mean we can, want to, or will help you. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat
On Tue, 2010-11-09 at 16:51 +0100, Dušan Novaković wrote: Hello there, I have to make chat for website that has around 10 000 users (small social network). So before I start, I would like to hear different opinions. Important thing is to have in mind that in one moment you can have over 1 000 users using chat. So, if you have time fill free to write you experience in this field, suggestions, etc. Thnx, Dusan -- Please consider the environment before printing this email. I did that for a site for my buddy... i tried a few different ways, and the current way seems to work decently... but i've been thinking about altering it... what i did for that one, is it inserts into a database what the person wrote, then on eth other side, it pulls every x seconds from the db, and using ajax adds to the div. it is a pain in the ass, but yeah, it works. I also had a flag for typing indicator. i am sure there are many different ways to do this, but posting to a db, and pulling from the db seemed to be the logical way to do it when i did that...my buddies old way of doing it, is at http://radiokaos.com it just posts to the db, and then refreshed the iframe every 20 seconds or something. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat system
On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi Daniel, Thanks. How can the user chooses the nickname? How about the list of connected users? On 6/19/07, Daniel Brown [EMAIL PROTECTED] wrote: On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi, I am looking for a simple php chat system (no registration, no private channels). Unfortunately the ones I've found (phpopenchat, phpfreechat) are too complicate, requiring the user to register or fail to work properly in IE6 or IE7. Any tips? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I have a one that I started putting together a few days ago that uses AJAX. It can accept user registration, multiple rooms, et cetera, but unless the files are included with the distribution, it's a single room without registration. Check it out: http://www.pilotpig.net/gchat/ -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 I'm adding all of that stuff in. As of now, the user can change their name by typing: /nick name but there may still be some bugs. I've only put about two hours of work into it so far, so there's a lot of stuff left undone. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat system
Daniel Brown wrote: On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi Daniel, ... I'm adding all of that stuff in. As of now, the user can change their name by typing: /nick name but there may still be some bugs. I've only put about two hours of work into it so far, so there's a lot of stuff left undone. pretty sick for 2 hours work. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat system
On 6/20/07, Jochem Maas [EMAIL PROTECTED] wrote: Daniel Brown wrote: On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi Daniel, ... I'm adding all of that stuff in. As of now, the user can change their name by typing: /nick name but there may still be some bugs. I've only put about two hours of work into it so far, so there's a lot of stuff left undone. pretty sick for 2 hours work. :-) Thanks, bro. It was actually because I wanted to start learning AJAX, and I figured that a chat script would be the best way to put what I'm learning into practice. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat system
On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi, I am looking for a simple php chat system (no registration, no private channels). Unfortunately the ones I've found (phpopenchat, phpfreechat) are too complicate, requiring the user to register or fail to work properly in IE6 or IE7. Any tips? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I have a one that I started putting together a few days ago that uses AJAX. It can accept user registration, multiple rooms, et cetera, but unless the files are included with the distribution, it's a single room without registration. Check it out: http://www.pilotpig.net/gchat/ -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat system
Hi Daniel, Thanks. How can the user chooses the nickname? How about the list of connected users? On 6/19/07, Daniel Brown [EMAIL PROTECTED] wrote: On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi, I am looking for a simple php chat system (no registration, no private channels). Unfortunately the ones I've found (phpopenchat, phpfreechat) are too complicate, requiring the user to register or fail to work properly in IE6 or IE7. Any tips? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I have a one that I started putting together a few days ago that uses AJAX. It can accept user registration, multiple rooms, et cetera, but unless the files are included with the distribution, it's a single room without registration. Check it out: http://www.pilotpig.net/gchat/ -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat module
should be not too difficult to setup using a couple of web pages running on localhost e socket hope help 2005/9/20, Vinicius Mapelli Schmaedek [EMAIL PROTECTED]: Somebody knows a chat module to be used for conversation between only two people? PS: sorry, my english is not very good :P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] chat script
This error message is because you are trying to send header information after you already printed some text. The header information have to come before any other information sent to the browser meaning : ?php Print (hello); header('Location: http://www.example.com/'); ? WON'T WORK!!! But ?php header('Location: http://www.example.com/'); print (hello); ? Will work And another ting the ?php should be in the first line of the php file even an empty line will generate the error!. Line 1= Line 2=?php Line 3= header('Location: http://www.example.com/'); . . . WON'T WORK!! And you can use headers_sent() to check if you can send the header information if (!headers_sent()) { header('Location: http://www.example.com/'); exit; } Have a nice day Yaron Khazai -Original Message- From: sukalyan banga [mailto:[EMAIL PROTECTED] Sent: Sunday, April 17, 2005 8:46 AM To: php-general@lists.php.net Subject: [PHP] chat script Sir, I am hosted a chat script at www.bioraj.net/raj/chat/ but it shows some error what should I do. sukalyan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chat server and chat client
* Thus wrote ascll: Greetings, Does anyone know how to use PHP to develop a simple chatting server and client? what protocol? Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] CHAT
Juan Pablo Herrera wrote: Hi! I need a chat program in php with GNU License. What's experience whith chat program in PHP? regards, Juan Pablo G-O-O-G-L-E: Search: php chat program gnu http://www.google.ca/search?q=php+chat+program+gnuie=UTF-8hl=enmeta= -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] CHAT
Juan Pablo Herrera wrote: Hi! I need a chat program in php with GNU License. What's experience whith chat program in PHP? regards, Juan Pablo G-O-O-G-L-E: Search: php chat program gnu http://www.google.ca/search?q=php+chat+program+gnuie=UTF-8hl=enmeta Thank you, but i am not answer Where. Experience? Regards, Juan Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat-name forms and Suffixes with Validation...
* Thus wrote Ryan Munevar ([EMAIL PROTECTED]): Hi Everyone, I'm making a form that takes the chat name user enters and combines it with the chat suffix. I'm unclear on what you're asking here. Does anyone have a list of all the available chat clients out there? So far I have, AIM, .mac, iChat. There are virtually endless numbers of chat clients, not to mention protocols. It is up to you wich ones to support: To name a couple: jabber (probably the best to support) ICQ Yahoo! zircu What's the easiest way to combine them with the actual name? JoeTreeman6.mac for example. again unclear. But how do I do it if it's something like SarahPoley69 on AIM? Does it even have a suffix? remains unlear. What about checking to see if they are on line? Not signed into the site but actually on line yaking away in cyberspace somewhere. Depends on the protocol And is it possible to verify a chat-names authenticity? Like does it really exist? Or if it's one of those sex bots that bombards the AIM chat rooms with 18/f/Web Cam crap? Depends on protocol. but I might be rather interested in that 18f/cam stuff ;) HIWTH Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHAT about PHP
* Thus wrote Damian Brown ([EMAIL PROTECTED]): www.phpexpert.org Programming Help and General Programming Topics Is this a joke? Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHAT about PHP
no Curt it is quite serious Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Damian Brown ([EMAIL PROTECTED]): www.phpexpert.org Programming Help and General Programming Topics Is this a joke? Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHAT about PHP
On Wed, 2003-08-20 at 11:11, Curt Zirzow wrote: * Thus wrote Damian Brown ([EMAIL PROTECTED]): www.phpexpert.org Programming Help and General Programming Topics Is this a joke? Looks like an email harvester. Why does it need an email address? Cheers, Rob. -- .-. | Worlds of Carnage - http://www.wocmud.org | :-: | Come visit a world of myth and legend where | | fantastical creatures come to life and the | | stuff of nightmares grasp for your soul.| `-' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHAT about PHP
On 20 Aug 2003 11:31:02 -0400, you wrote: On Wed, 2003-08-20 at 11:11, Curt Zirzow wrote: * Thus wrote Damian Brown ([EMAIL PROTECTED]): www.phpexpert.org Programming Help and General Programming Topics Is this a joke? Looks like an email harvester. Why does it need an email address? Search-engine spammer and an onClose popup ad, too. And multiple!!! exclamation!!! marks!!! Yeah, that's someone I'd do business with. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHAT about PHP
Sites like these will drive me to ASP... On Wed, 2003-08-20 at 17:39, David Otton wrote: On 20 Aug 2003 11:31:02 -0400, you wrote: On Wed, 2003-08-20 at 11:11, Curt Zirzow wrote: * Thus wrote Damian Brown ([EMAIL PROTECTED]): www.phpexpert.org Programming Help and General Programming Topics Is this a joke? Looks like an email harvester. Why does it need an email address? Search-engine spammer and an onClose popup ad, too. And multiple!!! exclamation!!! marks!!! Yeah, that's someone I'd do business with. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CHAT about PHP
You can program a site as complicated as this in ASP as well *g* At 18:19 20.08.2003, P.Agenbag said: [snip] Sites like these will drive me to ASP... On Wed, 2003-08-20 at 17:39, David Otton wrote: On 20 Aug 2003 11:31:02 -0400, you wrote: On Wed, 2003-08-20 at 11:11, Curt Zirzow wrote: * Thus wrote Damian Brown ([EMAIL PROTECTED]): www.phpexpert.org Programming Help and General Programming Topics Is this a joke? Looks like an email harvester. Why does it need an email address? Search-engine spammer and an onClose popup ad, too. And multiple!!! exclamation!!! marks!!! Yeah, that's someone I'd do business with. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php [snip] -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chat rooms
Does anyone have any suggestions for a good small FREe chat room to add to a family site? A friend here at work is hosting a site from home and is looking to add a chat room. Some of his site is php so if it is php based, that would be great. We even talked today about creating our own. Just Google for PHP chat There are some good ones out there already. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chat rooms
Go to Hotscripts.comPHPScriptsandProgramsGroupware and download PhProjekt - chat and a whole lot more Could be too much, I dunno! VW Quoting Edward Peloke [EMAIL PROTECTED]: ### Does anyone have any suggestions for a good small FREe chat room to add to ### a ### family site? A friend here at work is hosting a site from home and is ### looking to add a chat room. Some of his site is php so if it is php ### based, ### that would be great. We even talked today about creating our own. ### ### Thanks, ### Eddie ### ### ### -- ### PHP General Mailing List (http://www.php.net/) ### To unsubscribe, visit: http://www.php.net/unsub.php ### ### -- Richard Whitney Transcend Development Producing the next phase of your internet presence. [EMAIL PROTECTED] http://xend.net 602-971-2791 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chat rooms
At 20:33 29-1-03, you wrote: Does anyone have any suggestions for a good small FREe chat room to add to a family site? A friend here at work is hosting a site from home and is looking to add a chat room. Some of his site is php so if it is php based, that would be great. We even talked today about creating our own. When you write your own, have a look in the book 'Web application development with PHP 4.0' by Tobias Ratschiller Till Gerken. Chapter 3 analyses the development of projects and takes a IRC chat application as an example. New Riders Publishing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat with php
Thomas Weber schrieb: Hi, i'm running a selfmade PHP-chat since one and a half year, currently version 3. Maybe we can share some ideas The image-idea is interesting, but would take heavy bandwith i think. My chat runs over a simple dsl-line with 256kbit upstream, there are up to 50 users at the same time (slow but okay). It's very good at 30 users, but there is a whole community with galleries etc. on the same server. What i know: To avoid reloads, you must use a stream. That's the flush()'n'sleep()-thing. This is my main-loop: 01 ini_set(max_execution_time, 0); 02 for(;;) 03 { 04 $newline = get_newline($last_row);// fetch a new line (out of an database for example, returns time, alias, text as array, or false if no new line is found) 05 if(is_array($newline)) 06 { 07 $newtext = format($newline);// format line for output (text bla could be (01:01) Alias: bla and /me bla could be Alias bla, returns the string to be outputtet to the browser) 08 if($newtext AND $newtext != $oldtext) echo $newtext;// if it's new text (avoids flooding), output the line! 09 $last_row = $newline[id];// next time fetch another id 10 flush();// sends buffer to browser 11 echo \n!-- for Opera --\n;// Opera seems to use a strange buffer and does not display the last line, so send another one, invincible 12 flush();// flush again, opera should now display the line 13 } 14 unset($newline); 15 16 usleep(20);// sleep some time, otherwise the script would eat 100% CPU. Usuable on my server (p3-550) are 10 to 50 msec 17 18 $loop++; 19 if($loop 600) 20 { 21 echo !-- TOK --\n;// some browsers kill the connection if it is dead for some time, so send a time out kill, some minutes are enaugh 22 $loop = 0;// reset 23 } 24 } Okay, tha's the deal.. max_execution_time is set to unlimited, I had streams running several days. Fortunately PHP kills the scripts automatically if no brower is listening. To fetch a line there are some ways the most simple is to query a database for a line with an higher id, but this eats up loads of cpu-usage in bigger chats. Currently i use shared memory. I've an php-console-script running wich fetches newline out of the database and writes 'em into shared memory. This is MUCH faster than have every stream-script connecting to the db. What i don't know: I'm searching for an better idea to interchange data between the scripts wich enter data, the server and the stream-scripts. Shared memory is good enaugh for the last two one, but it ever takes min. the 20 ms sleep-time for a new line. I need something to awaik the script exactly when a new line is in memory. Synchronisation between enter and server is more difficult, because there is the posibillity for two scripts entering a new line at the same time don't know how to avoid this. I hope this helps. Hey cool, That's working. The only problem I have now is that I want the most recent text at the top. But that script adds it on the bottom. Any way to change that? At least a way to always scroll automatically to the bottom? Cya, Olli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat with php
I've thought about adding the text on the top, but never found a good way to make that (not with plain HTML, it would require a java-applet to display the stream). Scrolling is quite simple, i use this: head SCRIPT language=JavaScript !-- doscroll = true; function Scroller() { if (doscroll != false) { window.scrollBy(0,15); } window.setTimeout(Scroller(),15) } Scroller(); parent.atok = 'CCOFs'; function atok(p1) { parent.atok = p1; } //-- /SCRIPT /head body onFocus=doscroll=false onBlur=doscroll=true onMouseOver=doscroll=false onMouseOut=doscroll=true ... It scrolls down whenever the mouse is outside the frame with the stream. Cya, Thomas 'Neo' Weber --- [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: Oliver Witt [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Thomas Weber [EMAIL PROTECTED] Sent: Tuesday, October 08, 2002 10:51 AM Subject: Re: [PHP] Chat with php Hey cool, That's working. The only problem I have now is that I want the most recent text at the top. But that script adds it on the bottom. Any way to change that? At least a way to always scroll automatically to the bottom? Cya, Olli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat with php
Thomas Weber schrieb: I've thought about adding the text on the top, but never found a good way to make that (not with plain HTML, it would require a java-applet to display the stream). Scrolling is quite simple, i use this: head SCRIPT language=JavaScript !-- doscroll = true; function Scroller() { if (doscroll != false) { window.scrollBy(0,15); } window.setTimeout(Scroller(),15) } Scroller(); parent.atok = 'CCOFs'; function atok(p1) { parent.atok = p1; } //-- /SCRIPT /head body onFocus=doscroll=false onBlur=doscroll=true onMouseOver=doscroll=false onMouseOut=doscroll=true ... It scrolls down whenever the mouse is outside the frame with the stream. Cya, Thomas 'Neo' Weber Cool, the scroll script is working well. Now, I'm working on a list that shows who's in the chat. The problem is that people who log in don't always log out. I've thought about some time out and automatical log out, but isn't there a way to determine who is on what page, at least how many are on it? Greetings, Olli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat with php
You can have your script enter a loop to check for data in a database. If data output it then calls the flush() function to output to the browser. Then sleep for some time, then wakeup and repeat. You may have issues with some browsers using this technique, but generally it does work. The key is that you never close the connection to the browser. You'll also want to occasionally output some invisible content, otherwise the connection_status() stuff never give the right value (at least not in 4.1.2) It struck me that these functions update their flags on output only. Which means you need to output something to the browser to detect that the user has hit stop, or has disconnected. Cheers, Rob. Oliver Witt wrote: I attempted to write a oage that you can chat on with php. It ended up being a page that reloads itself all the time which isn't really what I wanted. But I didn't know how to do it differently. Is there another way? I heard something about flush()? Kind regards, -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat with php
But, Robert, doesn't this technique leave a connection open on the server--and, won't it cause the server to run out of resources after a very finite number of connections has been established? Marco On Mon, 2002-10-07 at 14:07, Robert Cummings wrote: You can have your script enter a loop to check for data in a database. If data output it then calls the flush() function to output to the browser. Then sleep for some time, then wakeup and repeat. You may have issues with some browsers using this technique, but generally it does work. The key is that you never close the connection to the browser. You'll also want to occasionally output some invisible content, otherwise the connection_status() stuff never give the right value (at least not in 4.1.2) It struck me that these functions update their flags on output only. Which means you need to output something to the browser to detect that the user has hit stop, or has disconnected. Cheers, Rob. Oliver Witt wrote: I attempted to write a oage that you can chat on with php. It ended up being a page that reloads itself all the time which isn't really what I wanted. But I didn't know how to do it differently. Is there another way? I heard something about flush()? Kind regards, -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Chat with php
Another way is to use javascript with PHP to pull the database every so many seconds. I have seen this in I think it was PHPChat. Been a long time however. --- Brad Dameron Network Account Executive TSCNet Inc. www.tscnet.com Silverdale, WA. 1-888-8TSCNET -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, October 07, 2002 11:07 AM To: Oliver Witt Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Chat with php You can have your script enter a loop to check for data in a database. If data output it then calls the flush() function to output to the browser. Then sleep for some time, then wakeup and repeat. You may have issues with some browsers using this technique, but generally it does work. The key is that you never close the connection to the browser. You'll also want to occasionally output some invisible content, otherwise the connection_status() stuff never give the right value (at least not in 4.1.2) It struck me that these functions update their flags on output only. Which means you need to output something to the browser to detect that the user has hit stop, or has disconnected. Cheers, Rob. Oliver Witt wrote: I attempted to write a oage that you can chat on with php. It ended up being a page that reloads itself all the time which isn't really what I wanted. But I didn't know how to do it differently. Is there another way? I heard something about flush()? Kind regards, -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat with php
Simple trick (well, not so simple, but kind of a Columbus' Egg): 1) Create an img tag in your web page that is hidden 2) Point the img tag to a php script that returns: 1) An image with a pixel width of 1 if there is new data to pick up from the server 2) An image with a pixel width of 0 otherwise 3) Create a javascript that refreshes the image every second (or every two seconds, or however often you feel necessary--the more often, the more responsive and real time your chat system will be). 4) Add an OnLoad event to the img tag that points to a Javascript that checks the width of the newly reloaded image. If the width is one, then you reload your chat text content (which you may want to put in an iframe to avoid having to reload the whole page). I don't have a script to show unfortunately, as it would probably be too complicated and long for the list (and I have no time to write it...sigh), but hopefully, this will give you the gist of it. Cheers, Marco On Mon, 2002-10-07 at 13:43, Oliver Witt wrote: I attempted to write a oage that you can chat on with php. It ended up being a page that reloads itself all the time which isn't really what I wanted. But I didn't know how to do it differently. Is there another way? I heard something about flush()? Kind regards, Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat with php
Brad Dameron schrieb: Another way is to use javascript with PHP to pull the database every so many seconds. I have seen this in I think it was PHPChat. Been a long time however. Well, that's pretty much how I've done it. And it is pretty crappy... Olli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat with php
Oliver-- I'm afraid I wasn't too clear! If you do it the way I'm suggesting, your page will look like it's reloading ONLY when there is new data available, and not continuously. PHPChat is an example--it looks really good and doesn't do any of the annoying things that reloading the page usually does (like the stupid click click click in IE). Marco On Mon, 2002-10-07 at 14:25, Oliver Witt wrote: Brad Dameron schrieb: Another way is to use javascript with PHP to pull the database every so many seconds. I have seen this in I think it was PHPChat. Been a long time however. Well, that's pretty much how I've done it. And it is pretty crappy... Olli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat with php
Marco Tabini schrieb: Simple trick (well, not so simple, but kind of a Columbus' Egg): 1) Create an img tag in your web page that is hidden 2) Point the img tag to a php script that returns: 1) An image with a pixel width of 1 if there is new data to pick up from the server 2) An image with a pixel width of 0 otherwise 3) Create a javascript that refreshes the image every second (or every two seconds, or however often you feel necessary--the more often, the more responsive and real time your chat system will be). 4) Add an OnLoad event to the img tag that points to a Javascript that checks the width of the newly reloaded image. If the width is one, then you reload your chat text content (which you may want to put in an iframe to avoid having to reload the whole page). I don't have a script to show unfortunately, as it would probably be too complicated and long for the list (and I have no time to write it...sigh), but hopefully, this will give you the gist of it. Cheers, Marco Okay, that sounds like something i can do, i just need to know how to hide and how to point the img tag at something. Olli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [Fwd: Re: [PHP] Chat with php]
Marco Tabini schrieb: Ok, off the top of my head (please don't be upset if it doesn't work right off, because I'm doing this from memory): Web page: script language=javascript function checkimage() { if (document.all.image1.width == 1) { document.all.fr1.src=http://www.mysite.com/chat.php;; } } function reloadimg() { document.all.image1.src=http://www.mysite.com/img.php;; setInterval (reloadimg(), 2000); // every 2 secs } /script body iframe name=fr1 src=chat.php img style=display=none src=http://www.mysite.com/chat.php; onLoad=javascript:checkimage(); /body In chat.php you simply push out whatever is in the database (the whole thing--or you come up with some method of just printing out what has changed since the last poll, which is trivial and beyond the point here). In img.php: ? function checkdb() { // This returns true if new data is available } $filename = (checkdb() ? '1pixel.gif' : '2pixel.gif'); header (Content-type: image/gif); readfile ($filename); ? 1pixel.gif is a one-pixel wide image, while 2pixel.gif is two pixels wide (it just occurred to me that you can't have a zero-pixels wide image, which would be quite pointless). The script basically reads in either file and spits it out after setting the content type. Once more, this script, as is, probably won't work because it was programmed in my messy head rather than in a proper PHP environment, but it should give you an idea of what needs to be done. In particular, remember to use the display CSS attribute rather than visibility so that the image will not take up any space on your page. Also, an apology--I seem to have mailed some messages twice by mistake. I was checking e-mail between eating my lunch and trying to get a tie on and things might have gotten a bit out of hand ;-) Let me know how it turns out! Thanks, I will try that script as soon as I find some time, probably tomorrow. But it seems to do the same thing as reloading would do: clicking all the time. But I'll try it tomorrow. Kind regards, Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP - Chat?
Check freshmeat - there are a couple of more than reasonable such projects (unfortunately I don't remember the names, but I checked some out and they seemed ok). Bogdan Andy wrote: HI there, I am wondering if a Chat coded in PHP would be sufficiant for a medium sized site. Maybe someone has a working example online. It would be no problem to get a ircdeamon working, just the client is in question. Thank you for your suggestions, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chat
www.google.com search for PHP Chat and see what you come up with. when you have a specific problem, come back here and we'll see what we can do for you. This list is most definitely not to tell you how to develop applications To give you a head start, there's something called PHPIRC or something similar, which uses a IRCD server as a backend to the PHP interface for chatting - it's on freshmeat.net the last time I looked... Kind Regards, Chris Knipe MegaLAN Corporate Networking Services Tel: +27 21 854 7064 Cell: +27 72 434 7582 - Original Message - From: André Riedel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 06, 2002 10:08 PM Subject: [PHP] Chat Can I make a Chat with PHP or what must I do? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Chat REALTIME
hey, i thought about this problem last time, i figured out that there's NO WAY to do this in php, (the auto refresh does not count). somebody pls prove me wrong. intrested to continue this discussion David I need to build a php-chat (online support system), but in realtime. I've develope a system that refresh in browser client in 5 seconds. But i need a system that works in realtime, what i meen is when a client or the server send a message, the browser refresh when a message was sent. All this without JAVA. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP Chat REALTIME
it's kinda impossible since HTTP is a STATELESS PROTOCOL Nuno Mariz [EMAIL PROTECTED] wrote in message 1011695546.3467.5.camel@sputnik">news:1011695546.3467.5.camel@sputnik... I need to build a php-chat (online support system), but in realtime. I've develope a system that refresh in browser client in 5 seconds. But i need a system that works in realtime, what i meen is when a client or the server send a message, the browser refresh when a message was sent. All this without JAVA. thanx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] chat with php
Edney Marcel Imm wrote: HI. Anyone have a chat with php? tks ME: Hello PHP PHP: Hello M: How are you? P: Tell me more about you. M: I'm just a guy living in Michigan P: Are you sure? M: Yes P: How does that make you feel? M: I dunno... Sorry - I couldn't resist. Visions of old ELIZA popped into my head when I read your question. There's a list of some chat software at http://www.zend.com/search_app.php?key=chatCID=9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: php chat
There are some Chat Programs at Zend.com's Applications Section: http://www.zend.com/apps.php?CID=240 Try also: http://www.zend.com/codex.php?CID=272 Sara On 9 Jul 2001, at 14:24, Jack wrote: Hi all is there anyone know where can I get a good php chat programme? Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]