1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Rep Power
    I have a chat script that I'd like to add a "streaming" mode to. I came across the following code which supposedly does this, but I can't seem to get it to work:


    use CGI qw( ush -nph);

    $| = 1;
    print multipart_init(-boundary=>'----');
    print multipart_start(-type=>'text/html');
    while (1) {

    print "HTML goes here...";
    sleep 1;

    print multipart_end;


    Is there anyone who'd be willing to look at the chat script and help me out with this?

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Rep Power
    Take a look at the no-parsed-header docs in the CGI.pm perldoc page. Run
    perldoc CGI
    then jump to "USING NPH SCRIPTS" and read everything below that, and the part on server push (which is what you're looking to do). How it'll all work depends on your webserver, so you'll need to read up the docs on your server about NPH scripts. I've never used NPH mode before, so beyond that I can't really help. Good luck.

IMN logo majestic logo threadwatch logo seochat tools logo