Welcome Guest, Not a member yet? Register   Sign In
Header Errors

[eluser]Eric Brown[/eluser]
I'm trying to output a pixel to the screen but I'm getting header errors. Here's my code.

$this->output->set_header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
            $this->output->set_header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
            #    # write out pertinent headers to let the browser know
            #    # that we're delivering a 43-byte GIF image
            $this->output->set_header("Content-type: image/gif");
            $this->output->set_header("Content-length: 43");
            #    # write one-pixel wide tranparent GIF to the output
            #    # stream

So I'm wondering how I can take the contents of the pixel stream and append them to the CI output as it appears that is executing at some point later.

What method forces the output to the browser so I can push the headers out before the image stream?

Theme © iAndrew 2016 - Forum software by © MyBB