Grabbing files , http only
Hi all, I want to write a simple script to go to a certain website and download a file on a daily basis. The site might be www.someplace.com and the file may be getme.txt Would I use Lynx in there somehow? I planned to use FTP to an FTP server, using automated (.netrc) FTP in cron, but our firewall (and proxy) at the ISP (NTL) isn't up for that. It worked from home :( So, I want to use http to save www.someplace.com/getme.txt to /root/getme.txt on our local machine. If it is using Lynx to do it, how do I set this up to use the NTL proxy? Thanks for you thoughts. -- Matt __________________________________________________ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com
So, I want to use http to save www.someplace.com/getme.txt to /root/getme.txt on our local machine.
You probably have a "fetch" command on your system, in which case the syntax might be something like fetch -o /root/getme.txt http://www.someplace.com/getme.txt -- Christopher Dawkins, Felsted School, Dunmow, Essex CM6 3JG 01371-822698/821076 or 07798 636725 cchd@felsted.essex.sch.uk
On Thu, 24 Jan 2002, Christopher Dawkins wrote:
So, I want to use http to save www.someplace.com/getme.txt to /root/getme.txt on our local machine. You probably have a "fetch" command on your system, in which case the syntax might be something like fetch -o /root/getme.txt http://www.someplace.com/getme.txt
In the absence of a "fetch" command you could also try wget: wget http://www.someplace.com/getme.txt Specify a proxy using the environment variable http_proxy: http_proxy=http://my.proxy.server:3128 wget http://www.someplace.com/getme.txt or export http_proxy=http://my.proxy.server:3128 wget http://www.someplace.com/getme.txt HTH, Michael
On Thu, 24 Jan 2002, Christopher Dawkins wrote:
So, I want to use http to save www.someplace.com/getme.txt to /root/getme.txt on our local machine. You probably have a "fetch" command on your system, in which case the syntax might be something like fetch -o /root/getme.txt http://www.someplace.com/getme.txt
In the absence of a "fetch" command you could also try wget:
wget http://www.someplace.com/getme.txt
Specify a proxy using the environment variable http_proxy:
http_proxy=http://my.proxy.server:3128 wget http://www.someplace.com/getme.txt
or
export http_proxy=http://my.proxy.server:3128 wget http://www.someplace.com/getme.txt
Depending on distribution the environment variable may already be set. With SuSE its one of things which can be set through /etc/rc.config It could also be set in /etc/profile -- Mark Evans St. Peter's CofE High School Phone: +44 1392 204764 X109 Fax: +44 1392 204763
Sorted! How many times does something 'just work' first time. I typed a suggestion (wget with proxy stuff first), and voila! It grabed it to my root folder. I didn't have fetch on my system. Big thanks for the prompt help folks. Solved. -- Matt __________________________________________________ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com
participants (4)
-
Christopher Dawkins
-
Mark Evans
-
Matt Johnson
-
Michael Brown