Re: File and socket handles

From: Date: Sun, 03 Dec 2000 06:03:44 +0000
Subject: Re: File and socket handles
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-28467@lists.php.net to get a copy of this message
Accually you are partially correct. http://php.net/manual/function.pfsockopen.php all connections are closed after the script ends if php is running as a cgi, or if the connection is not persistant. Persistant db connections and persistnat fsockopen connections are not closed. on page one use pfsockopen() on page two use pfsockopen() and it will automatically use the previous connection. Chris Lee Mediawaveonline.com In article <00120310482400.01740@robin.localdomain>, g8ecj@abmdata.demon.co.uk wrote: > On Saturday 02 December 2000 19:08, you wrote: >> On Sat, 2 Dec 2000, Robin Gilks wrote: >> > Greetings all >> > >> > I've scanned the list archives but not found anything that relates to >> > my problem with socket handles. >> > >> > I want to open a socket connection from one frame (script) and >> > transmit data to the user from that socket - no problem there, all >> > working fine using either fsockopen or pfsockopen. > >> You can't. The socket (and in fact, any PHP resource except a >> persistent DB connection) is closed once the first script stops >> running. > > > Thanks for that - looks like I'll have to do the output in a loop and > scan for input in the same loop & use the input script to transfer the > data across via Mysql or similar... > > Cheers >

« previous php.general (#28467) next »