develooper Front page | perl.libwww | Postings from November 2001

Can't read from a page

Thread Next
From:
Gustaf Bergstr?
Date:
November 23, 2001 07:47
Subject:
Can't read from a page
Message ID:
1006530160.183gustaf.bergstrom@home.se
I am writing a script that collects data drom this page: 

http://www.geocaching.com/seek/nearest_cache.asp?
country_id=10&submit3=GO 

No problem with that, but now I want to get som data from 
this page too: 

http://www.geocaching.com/seek/cache_details.asp?ID=10420 

....and it is impossible! When the script tries to access 
the page, it gets an error page (which you normally would 
get if you misspelled the address or used a nonexisting 
ID#) 

Can a page created with asp have some sort of block, that 
stops scripts from viewing it? Why can it read the first 
address but not the second? 

Here is a part of the code I use: 

$data = "http://www.geocaching.com/seek/cache_details.asp?
ID=10420"; 
$lookup = new HTTP::Request 'GET', "$data"; 
$response = $ua->request($lookup); 
@lines = split (/\n/, $response->content); 
print @lines; # just for testing


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About