473,405 Members | 2,171 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,405 software developers and data experts.

Perl - downloading files - proxy problem

24
I am using Active Perl, and i-am having problems downloading files from internet because of the proxy.
The script is workin when no proxy is present, but now it refuses to download files.
Here is the script:
Expand|Select|Wrap|Line Numbers
  1. #use module
  2. use XML::Simple;
  3. use Data::Dumper;
  4. use LWP::Simple;
  5.  
  6. #test function
  7. sub test_func
  8. {
  9. print "\n Test function starts:\n";
  10. my $data_file = "http://website.com/file.txt";
  11.  
  12. my $remote_xml = get $data_file;
  13. print "File:\n $remote_xml";
  14. }
  15.  
  16. test_func();
What else i needed here ??
Jun 20 '07 #1
4 1829
KevinADC
4,059 Expert 2GB
look into using LWP::UserAgent instead of LWP::Simple

cpan LWP::UserAgent
Jun 20 '07 #2
miller
1,089 Expert 1GB
The only thing that I would do, and advise anyone else to do would be to read the extensive documentation.

perldoc lwptut

- Miller
Jun 20 '07 #3
c83
24
The only thing that I would do, and advise anyone else to do would be to read the extensive documentation.

perldoc lwptut

- Miller
Thank you for your advice. I -ve solved the problem.
Jun 20 '07 #4
KevinADC
4,059 Expert 2GB
The only thing that I would do, and advise anyone else to do would be to read the extensive documentation.

perldoc lwptut

- Miller

Good suggestion. Note it will direct the reader to LWP::UserAgent in the case of a proxy.

Kevin
Jun 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Dekaritae | last post by:
I have a script that I've written in Perl that retrieves files generated from a template. It works decently enough, but I'd like to rewrite it in Python (Perl was just a detour; it was originally...
3
by: FLOTServer | last post by:
Here's my problem: I run a gameserver that runs the game "Medal of Honor". On the game server is log file which contains all of the data from the players for that day (kills, deaths, etc...). I...
0
by: Jörg Braun | last post by:
Hello NG, i have a problem With WebRequest! i want to download a htaccess saved file over a proxyconnetion with authentication. Download a file what is not saved with htaccess is no problem,...
4
by: Joe | last post by:
I'm hosting my web service on a Windows 2003 box which is remotely located. When trying to add a web reference to a C# project I get an error message 'There was an error downloading...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
3
by: Nibwt | last post by:
I've been trying to download some files from a file sharing site. Since the site blocked me from accessing it, I tried to use a web proxy to access the site. It worked, but I wasn't able to download....
1
by: afelotreyu | last post by:
Hello, I currently have an application in perl that starts a text based torrent client, once I give the necessary parameters to the torrent.exe it will start printing out the following information...
11
by: bthalapathi | last post by:
I have written a script to connect the mysql db #!/usr/bin/perl -w use DBI; #definition of variables $db="MYTEST"; $host="localhost"; $user="root"; $password="rootpass";
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.