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

    Join Date
    Aug 2000
    Posts
    1
    Rep Power
    0
    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?

    Thanks,
    Charles
    holomax@xmail.com
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    81
    Rep Power
    15
    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