473,387 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Header: Content-Disposition followed by Location

Hello,

I have stumbled upon a problem, for which I can’t seem to find a
solution for. I would like to offer files for downloading. To allow
files to have duplicate names I renamed as random alphanumeric-
strings. With the header command I can give them their “old name” back
just before downloading. Then use readfile or loop through feof/echo
fread to push the file’s contents. This works well.

The amount of files has increased, so that I am hosting them on a
separate box.
How do I push the files without:
a) installing a script on the separate box
and b) channeling the bandwidth through the server with the script?

I was hoping I could send a content-disposition-header command
followed by a location-header command, but that does not seem to work.
The location gets changed but the content-disposition info gets
ignored.

Does anyone have any ideas on this?

Thanks!
-Casper
Jul 9 '08 #1
3 2188
C. Feldmann wrote:
Hello,

I have stumbled upon a problem, for which I can’t seem to find a
solution for. I would like to offer files for downloading. To allow
files to have duplicate names I renamed as random alphanumeric-
strings. With the header command I can give them their “old name” back
just before downloading. Then use readfile or loop through feof/echo
fread to push the file’s contents. This works well.

The amount of files has increased, so that I am hosting them on a
separate box.
How do I push the files without:
a) installing a script on the separate box
and b) channeling the bandwidth through the server with the script?

I was hoping I could send a content-disposition-header command
followed by a location-header command, but that does not seem to work.
The location gets changed but the content-disposition info gets
ignored.

Does anyone have any ideas on this?

Thanks!
-Casper
You won't be able to serve the files from the other box directly without
a server installed, and probably some scripts. Then you can use the
Location header to redirect - although your user will also see the new
location.

Otherwise, you can fetch the files from the other server, i.e. with nfs,
and server them from your server.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jul 9 '08 #2
On Jul 9, 6:38*pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
C. Feldmann wrote:
Hello,
I have stumbled upon a problem, for which I can’t seem to find a
solution for. I would like to offer files for downloading. To allow
files to have duplicate names I renamed as random alphanumeric-
strings. With the header command I can give them their “old name” back
just before downloading. Then use readfile or loop through feof/echo
fread to push the file’s contents. This works well.
The amount of files has increased, so that I am hosting them on a
separate box.
How do I push the files without:
a) installing a script on the separate box
and b) channeling the bandwidth through the server with the script?
I was hoping I could send a content-disposition-header command
followed by a location-header command, but that does not seem to work.
The location gets changed but the content-disposition info gets
ignored.
Does anyone have any ideas on this?
Thanks!
-Casper

You won't be able to serve the files from the other box directly without
a server installed, and probably some scripts. *Then you can use the
Location header to redirect - although your user will also see the new
location.

Otherwise, you can fetch the files from the other server, i.e. with nfs,
and server them from your server.
(or http or....?)

C.

Jul 10 '08 #3
C. (http://symcbean.blogspot.com/) wrote:
On Jul 9, 6:38 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>C. Feldmann wrote:
>>Hello,
I have stumbled upon a problem, for which I can’t seem to find a
solution for. I would like to offer files for downloading. To allow
files to have duplicate names I renamed as random alphanumeric-
strings. With the header command I can give them their “old name” back
just before downloading. Then use readfile or loop through feof/echo
fread to push the file’s contents. This works well.
The amount of files has increased, so that I am hosting them on a
separate box.
How do I push the files without:
a) installing a script on the separate box
and b) channeling the bandwidth through the server with the script?
I was hoping I could send a content-disposition-header command
followed by a location-header command, but that does not seem to work.
The location gets changed but the content-disposition info gets
ignored.
Does anyone have any ideas on this?
Thanks!
-Casper
You won't be able to serve the files from the other box directly without
a server installed, and probably some scripts. Then you can use the
Location header to redirect - although your user will also see the new
location.

Otherwise, you can fetch the files from the other server, i.e. with nfs,
and server them from your server.

(or http or....?)

C.

For http he would have to have a webserver going on the other system.
Which means he might as well just redirect and save the bandwidth.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jul 10 '08 #4

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

Similar topics

5
by: Phil Powell | last post by:
I created a page that will be doing image resizing and manipulation, which seems to work (using GD library). However, upon returning to the page where the image has been changed, I still see the...
0
by: george1069 george1069 | last post by:
Hi, I'm repeating <fo-table> using loop and there is <fo-table-header> to generate a title for each of the table generated. In one of the output pages, a new table is generated near to the...
1
by: Sam | last post by:
I want to create header whereby I could reuse whenever new aspx. However, it is display nothing and please find my coding: index.aspx ========== <%@ Page Language="VB" %> <%@ Register...
7
by: xkeops | last post by:
Thinking of creating a website, most of the pages will have a general toolbar menu, a content and a footer. The content will be the only one who's gonna change but the rest (header,footer) will...
2
by: ~john | last post by:
I'm trying to get my header to have 2 images, one for the top left and one for the top right. Here's a link to my page... http://levelwave.com/dev/div/index.html and will eventually be...
1
by: KoosHopeloos | last post by:
L.S., I'm trying to make a layout which is completely fixed in width and height if needed by using three divs rows (header, content, footer) which have each 3 div again to be able to play around...
1
by: Shalako | last post by:
I check my error log and see these entries: malformed header from script. Bad header= Missing gauge reports are ind: padata.pl /perl/pema/padata.pl did not send an HTTP header malformed...
4
by: herbivore | last post by:
I am using curl to do a post request to a server. The request contains xml data, the standard post headers sent by curl do not work. I have tried using the custom_request option with the whole post...
3
by: Bob Murdoch | last post by:
I'm using the following to send a binary file to a user: Response.AddHeader('Content-Disposition','attachment;filename=' + Request('FileName') + ';'); var vType = 'application/octetstream';...
2
by: urbanedge | last post by:
I've just acquired a site and uploaded to godaddy and the email function won't work. I'm new to php and I'm not able to determine where the issue is. I've commented out $this->header .=...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.