Re: trouble with get function and proxy
- From: ver_for@xxxxxxxx
- Date: 31 Aug 2005 08:12:11 -0700
I have found two solutions that work.
1 - modifying the configuration of the OS
Under Windows NT or XP
Right click on "My Computer", click on "properties", select the
"environment" tab. These are your environment settings. Make the
following changes:
1. Add the setting HTTP_proxy, with your proxy name as the value
(you must include "http://" ), followed by a colon and the proxy port,
if applicable; e.g., "http://proxy:8080"
2. Add the setting HTTP_proxy_user, with your user name as the
value
3. Add the setting HTTP_proxy_pass, with your password as the
value
Under Windows 95
In your AUTOEXEC.BAT file, place the following lines then reboot so
the changes can take effect:
3. SET HTTP_proxy=<your proxy server (you must include "http://"
>, followed by a colon and the proxy port, if applicable; e.g., SET HTTP_proxy=http://proxy:8080
4. SET HTTP_proxy_user=<your user name>
5. SET HTTP_proxy_pass=<your password>
2 - modifying the script perl
use LWP::Simple;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new();
$ua->proxy( 'http', 'http://255.255.255.255:3615/');
my $req = HTTP::Request->new( GET => 'http://www.google.com/' );
my $res = $ua->request($req);
my $page = $res->content();
.
- References:
- trouble with get function and proxy
- From: ver_for
- trouble with get function and proxy
- Prev by Date: DOM from XML without C libs?
- Previous by thread: Re: trouble with get function and proxy
- Next by thread: Calculation with DATEs
- Index(es):
Relevant Pages
|
|