Gerald,
Thanks for the followup.  I have two questions:

1) By extra space in the file, you mean outside the [- -] embperl constructs 
right?  (This can't be there because it will be sent to the browser which will 
cause problems, right?)

2) Don't you have to do something fancy with the http output headers?  How 
do I tell the browser that a zip file is coming?

Scott

On 18 May 2002 at 13:17, Gerald Richter wrote:

> 
> 
> > I have a <A HREF link that calls a script on the server. The script ends
> up
> > with redirecting the customers browser to the zip file it creates.  I want
> the
> > script to send the zip file instead of redirecting the user to the zip
> file (and
> > potentially losing the form changes the link is on).
> >
> > Is there an easy way to use EmbPerl to send the zip file?
> >
> 
> That the same like for any other binary file:
> 
> [-
> $escmode = 0 ;
> open FH, "filename.zip" ;
> binmode FH ; # only on windows
> while (read(FH, $buffer, 32768))
>                 {
>                 print OUT $buffer ;
>                 }
> close FH;
> -]
> 
> Make sure you don't have any extra spaces/newlines in the page. You could do
> the same with a Apache::Reigstry script to avoid problems with extra space
> in the file
> 
> Gerald
> 
> 
> -------------------------------------------------------------
> Gerald Richter    ecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
> 
> Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
> E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
> WWW:        http://www.ecos.de      Fax:      +49 6133 925152
> -------------------------------------------------------------
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to