
August 21st, 2000, 11:55 AM
|
|
Contributing User
|
|
Join Date: Aug 2000
Posts: 81
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|
You have to use the excellent LWP module set (well, you don't _have_ to, but it'd be damn silly not to). Something like:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent('SomeUAString' . $ua->agent);
my $req = HTTP::Request->new( GET => 'http://www.domain.com/somefile.php3' );
my $res = $ua->request($req);
print $res->content;
[/code]
I'm not sure what stripslashes does for you in PHP (I don't do PHP). If you let me know I'll give you equivalent Perl code. If it's just used to remove escape characters from the stream (e.g. ' => '), use:
$res->content =~ s///g;
before the prin $res->content line.
Loads of docs on LWP can be found with perldoc LWP
|