Reply to Re: Is it possible to avoid loading the script for each request

Your name:

Reply:


Posted by Alexey Kulentsov on 06/02/07 18:21

DavidNorep wrote:
> I do not know PHP, consider to write a CGI with this technology and
> have the following question.
>
> Is it possible to invoke a PHP script and let it endlessly wait for
> requests from a website (a Java applet in my case) and serve the
> requests when they arrive? I want to avoid loading the script for each
> request.
Yes, but only for output. I done web chat with this technology (I
call it endless connection) long time ago, before AJAX era. It was PHP
script on server-side and javascript on client-side. You need
set_time_limit() to prevent timeout on server so you can't do it in safe
mode. And you need to send periodically something to prevent timeout on
client. Request sent to additional short script who put it to database
or another place. Main script in endless loop checks for new requests,
process it and sends result back to client.
Now here is no reasons to do such things.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация