Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

User file uploads

3 views
Skip to first unread message

Pjotr Wedersteers

unread,
Jul 28, 2004, 9:13:16 AM7/28/04
to
Hi,

I am building a page that allows people to send in text and/or html files
and have them analyzed for several statistics by a serverside PHP script.

I'd like the files to be sent zipped or rar'd or whatever flavour is
opensource, free and available. How can I -other than by asking them to zip
their files- ensure the files they send are compressed before they're
actually sent ? I guess this must be done in JS ? Can the PHP script
auto-decompress the files and process the contents ?
And when I send their analysis back as HTML, is it possible to have that
sent in a zipped way and auto-decompressed in the viewer's browser ? I don't
really understand the Apache zip option in the configuration.

Help much appreciated.
Pjotr


Richard Cornford

unread,
Jul 28, 2004, 11:43:21 AM7/28/04
to
Pjotr Wedersteers wrote:
> I am building a page that allows people to send in text and/or html
> files and have them analyzed for several statistics by a serverside
> PHP script.
>
> I'd like the files to be sent zipped or rar'd or whatever flavour is
> opensource, free and available. How can I -other than by asking them
> to zip their files- ensure the files they send are compressed before
> they're actually sent ?

You absolutely cannot do that.

> I guess this must be done in JS ?

Unlikely as javascript has no file manipulation features built in.
Javascript is also not capable of 'ensuring' anything as client-side
scripting may be disabled/unavailable, subverted or by-passed. Anything
arriving at a server in an HTTP request should be regarded as unknown
and suspect.

> Can the PHP
> script auto-decompress the files and process the contents ?

A question better asked in a PHP group, but the answer is probably yes.

> And when I send their analysis back as HTML, is it possible to have
> that sent in a zipped way and auto-decompressed in the viewer's
> browser ?

Doesn't HTTP 1.1 include provision for doing exactly that automatically?

> I don't really understand the Apache zip option in the
> configuration.

RTFM, then ask an apache/http server group.

Richard.


0 new messages