473,657 Members | 2,493 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User file uploads

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
Jul 17 '05 #1
1 1549
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.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3564
by: kafooey | last post by:
Hi all, I've been digging around on the newsgroups and the web for a possible answer for this problem, but have so far come up with nothing so thought I would ask here... I have the following code doing a file upload... $upload_result =
3
2958
by: dan glenn | last post by:
(PHP 4.3.4) THIS IS DRIVING ME NUTS! I have a website where I offer members their own bit of webspace to use and am coding a very simple 'filemanager' that allows a user to upload, delete, and edit text files (members, of course, will not have normal sign-on FTP access to the site - I just limit them to their own folder space). I'm hitting a real problem with file and directory permissions, in that it seems I'm experiencing...
1
1669
by: Doug Helm | last post by:
I should have been more clear in my subject line. I was also the poster in the "File Uploads" topic. I'm not having any luck getting file uploads to work (multi-part HTML form) on a Windows server. I'm using a very close approximation of public domain code that I found. I've tried a couple of different implementations (very similar), but I am essentially using the following test code: ...
12
7768
by: JMB | last post by:
Hello, I was wondering if anyone knew of any projects extending the inline upload progress bar to utilize an inpage image uploader with bar, without having to refresh or go to a seperate page, nor opening a second box for display of the progress bar. I had been using the MegaUpload that was adapted from Raditha's script at http://www.raditha.com/upload.php . The MegaUpload script I have been using takes the progress bar inpage,...
4
5162
by: yehaimanish | last post by:
I am developing the project management system. Each Project: 1. Title, description ... , stored in mysql database 2. Upto ten files (initial description), (name in db, file in file system) 3. Message board, stored in mysql database (1 file per message, message in db, file in file system) I need a link (Download Project) which will download all the project
4
3494
by: mcrose | last post by:
I've written theh standard applicaiton for our client to allow indexed (customer name, subject etc) file uploads via secure http using the <input type='file'http element. This works great, and has the added benefit over FTP that I can begin processing the file data stream while the download is in progress. Yeah. The client is happy, but now they want to upload multi GB files. The http request are limitted to something like 2 or 4 GB. I...
3
19864
by: markus.rietzler | last post by:
i want to do (multiple) file upload(s) and display a progress bar. with firefox and safari it is no problem at all. only IE makes some problems. my script is based on ajax-uploader, which can be found at www.srmiles.com/freestuff/ajax_file_uploader/ . you can do multiple file uploads. each upload will have it's own "form"-tag, so that each file is uploaded for its own. could be a good solution if there are "big" uploads.
6
2203
by: Emmanuel Petit | last post by:
First of all I am rather new into PHP. I use php 5 and I am putting together a web site for a local association I belong too. Most of the site is okay, except for this problem : I need to be able for the member of the site to upload files (gif, jpg or pdf). After reading a lot about the danger of file uploading, I decided to create a folder at the root of the web server. The upload of the files goes on without any problem, but when i...
6
2705
by: Milan Krejci | last post by:
while(list($key,$value) = each($_FILES)) { if(!empty($value)){ $filename = $value; $add = "upimg/$filename"; echo $_FILES; $error=copy($_FILES, $add); if (!$error) $progressUploadingPhotos=false; $error=chmod($add,0777); if (!$error) $progressUploadingPhotos=false;
10
1482
by: =?ISO-8859-1?B?UOlw6g==?= | last post by:
Hello. Im new to php and i had experience in ASP. IM trying to get a pdf file from a remote folder and what happens is that opens a new page. Here is the code: <a href="./uploads/files/<?php echo $pdf ?>">Get File!</a>
0
8421
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8325
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8844
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8742
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7354
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1971
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.