LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-20-2004, 09:32 AM   #1
matt1982
Member
 
Registered: Nov 2004
Location: ontario, canada
Distribution: debian
Posts: 52

Rep: Reputation: 15
Question redirect


good mornin all,

i can retrieve arguments of the url ...?=&ContactID=334&download=filename.zip

here's my question, i retrieve the id, and the file they download, but how can i redirect them to the actual file they want, i know what it is,

but it has to be some like this right? http://www.blabla.com/filename($download), by inserting the value at the end of the url,

how can i do this, i'm looking for the answer so don't think i'm just waiting for it on a silver platter,

always thanks ahead.
 
Old 12-20-2004, 09:43 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Is it what you want ?
PHP Code:
$filename $_GET["download"];

header("Content-Type: application/zip");
header("Content-Disposition: attachment; filename=$filename");

readfile("/path/to/$filename"); 

Last edited by Cedrik; 12-20-2004 at 09:45 AM.
 
Old 12-20-2004, 09:53 AM   #3
matt1982
Member
 
Registered: Nov 2004
Location: ontario, canada
Distribution: debian
Posts: 52

Original Poster
Rep: Reputation: 15
yeah thanks, i've tried it and it seems to work like i want it to for the time beeing,...

hmm

i can manage the rest from here i think., thanks

hmm.



thanks for your help.

Last edited by matt1982; 12-21-2004 at 07:03 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Redirect Elijah Programming 2 09-09-2004 09:56 PM
Redirect wonderland Linux - Newbie 3 05-24-2004 11:50 PM
redirect into C++ without a file ? C++Boar Programming 1 04-24-2004 10:20 AM
redirect spank Linux - Newbie 2 03-01-2004 03:38 PM
Redirect sheek Programming 1 07-25-2003 12:53 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration