Click here to get back home

Header: Content-Disposition followed by Location

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Header: Content-Disposition followed by Location C. Feldmann 07-09-2008
Get Chitika Premium
Posted by C. Feldmann on July 9, 2008, 9:15 am
Please log in for more thread options
Hello,

I have stumbled upon a problem, for which I can=92t 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 =93old name=94 back
just before downloading. Then use readfile or loop through feof/echo
fread to push the file=92s 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

Posted by Jerry Stuckle on July 9, 2008, 1:38 pm
Please log in for more thread options
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.
jstucklex@attglobal.net
==================


Posted by C. (http://symcbean.blogspot.c on July 10, 2008, 12:09 pm
Please log in for more thread options
> C. Feldmann wrote:
> > Hello,
>
> > I have stumbled upon a problem, for which I can=92t 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 =93old name=94 b=
ack
> > just before downloading. Then use readfile or loop through feof/echo
> > fread to push the file=92s 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. =A0Then 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.


Similar ThreadsPosted
header('Location:') jump ignored? August 3, 2004, 1:25 pm
header("Location: ..."); Problem August 25, 2004, 7:15 pm
output sent and location header April 28, 2005, 4:13 am
Header(Location) query August 1, 2005, 3:14 pm
header location and redirect August 25, 2005, 6:48 pm
header("Location: ..."); NOT WORKING!? March 20, 2006, 5:50 pm
header(Location: $var) loops in IE July 13, 2006, 10:40 am
php - header Location very slow December 30, 2006, 3:20 pm
Problem with header("Location:.. function July 7, 2005, 3:15 am
Include and Header(Location: ) not working together August 27, 2006, 1:36 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap