LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-22-2005, 05:08 PM   #1
EmOuBi
LQ Newbie
 
Registered: Jul 2005
Posts: 24

Rep: Reputation: 15
Unhappy wget and redirection


Hi folks

Is wget support php redirection ?

I want to download htttp://www.nsbop.sux/download.php?id=333 , it redirects to htttp://www.nsbop.sux/staff/emoubi.tgz

When I execute:
wget -c htttp://www.nsbop.sux/download.php?id=333 it downloads the file staff/emoubi.tgz but with name download.php?id=333

How can I make wget to follow the redirections and save the file with his actual file name (emoubi.tgz) ?


Also I wanna ask can I download with links without opening his user interface ? Something like:
links --download htttp://www.nsbop.sux/download.php?id=333
 
Old 07-22-2005, 05:16 PM   #2
AgentDenim
LQ Newbie
 
Registered: Jul 2005
Posts: 8

Rep: Reputation: 0
wget -o doesn't work? Just a thought.

Good luck,
- A
www.HOSERS.org
www.ComicMaps.com
 
Old 07-22-2005, 05:23 PM   #3
EmOuBi
LQ Newbie
 
Registered: Jul 2005
Posts: 24

Original Poster
Rep: Reputation: 15
nope

I do not know the real file name of download.php?id=333. That's the problem, wget must redirect to the actual file and save it with it's actual name (emoubi.tgz in my example)
 
Old 07-23-2005, 10:33 PM   #4
AgentDenim
LQ Newbie
 
Registered: Jul 2005
Posts: 8

Rep: Reputation: 0
Right but with the -o option, you don't need to know the name, you just make one you like (-o is to specify the output name).
I don't think it supports PHP redirection, but I'm not sure. I don't see anything in the man, info, or FAQ about it.

- A
 
Old 07-24-2005, 04:39 AM   #5
EmOuBi
LQ Newbie
 
Registered: Jul 2005
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by AgentDenim
Right but with the -o option, you don't need to know the name, you just make one you like (-o is to specify the output name).
Exactly. I don't want to specify a file name because I don't know it I'm talking about 10 000+ files.

Thanks for the answers anyway.
 
Old 06-21-2012, 06:05 AM   #6
Kokos
LQ Newbie
 
Registered: Jun 2012
Posts: 1

Rep: Reputation: Disabled
From manual:

‘--trust-server-names’
If this is set to on, on a redirect the last component of the redirection URL will be used as the local file name. By default it is used the last component in the original URL.
 
1 members found this post helpful.
Old 01-09-2013, 05:53 AM   #7
kpothi
LQ Newbie
 
Registered: Nov 2007
Location: Madurai, TN, India
Distribution: CrunchBang, CentOS
Posts: 2

Rep: Reputation: 0
max-redirect

For security reasons, the distributions set max-redirect to zero. You may set it to 1 at the run-time like ....

wget --max-redirect=1 http://domainname.com/path/to/file/to/download

or you may add the following line at the bottom of /etc/wgetrc (the usual default location)...

max-redirect = 1
 
  


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
wget/curl problems. redirection after post method tommmmmm Linux - Software 1 08-10-2005 10:36 AM
error redirection raumohir Linux - Newbie 4 03-30-2005 12:13 PM
redirection in C pantera Programming 2 08-11-2004 01:06 PM
communication redirection chtthies Linux - Newbie 1 11-11-2003 08:33 PM
Output redirection legtester Linux - General 4 07-07-2003 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:16 AM.

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