spewn
Programmer
- May 7, 2001
- 1,034
a while back i used this code to pull the contents from a web page and then save to a file. worked fine...
it works fine if i'm trying to call up a different website, but if i run this code from my script and the script is from xyzpage.net, it produces a bad response.
basically, i'm trying to run this from a script, and it pulls a file that is also on the same directory.
if that makes any sense.
any ideas?
- g
Code:
$ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
$response = $ua->get('[URL unfurl="true"]http://xyzpage.net/i.pl?a=home');[/URL]
if ($response->is_success) {$testresponse='good';}
else {$testresponse='bad';}
it works fine if i'm trying to call up a different website, but if i run this code from my script and the script is from xyzpage.net, it produces a bad response.
basically, i'm trying to run this from a script, and it pulls a file that is also on the same directory.
if that makes any sense.
any ideas?
- g