The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Does PHP exit the loop if a client disconnects?
leosaint
post Mar 17 2007, 02:42 AM
Post #1





Group: Members
Posts: 1
Joined: 17-March 07
Member No.: 2,229



I am writting a shoutcast server in php, which will allow you to host a shout cast server via your website, my question is simply this.

CODE

for($i=0; $i<$db->num_rows(); $i++) {
    if ($sql_data['on']) {
        $fs = new filestream();
        $fs->set_file_path($sql_data['filepath']);
        $fs->set_bitrate(2000);
        $fs->open_file_echo_seek(32); // calls to a class to echo out the file
    }
    $sql_data = $db->next_row();    
}


Will this continue going on if the client disconnects... If so I need to figure out what to check for to make sure it should keep writing the data.

Thanks for your time,

Leo Saint.

This post has been edited by leosaint: Mar 17 2007, 02:43 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Effovex
post Mar 17 2007, 08:46 AM
Post #2


Serious Coder
*****

Group: Members
Posts: 251
Joined: 6-January 07
From: Sherbrooke, Qc, Canada
Member No.: 1,477



Connection handling. By default the script aborts when the client disconnects, but you can modify that behaviour.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 04:10 PM