Hi,
I'm currently registered on several boating Forums. Since I travel a lot, I wrote a program to copy certain thread on a daily basis and store them on my server for later reading.
For some reason, one of those forum let me browse it no problem but when I used my script, I get a "denied access type page". I contacted the Webmaster and he assured me that my IP was not banned... What can it be? Is there a bad exchange between the script and the Web Page?
Here is the script that gets the Web page. It works before with other forums.
Thanks you for your help.
Yves
I'm currently registered on several boating Forums. Since I travel a lot, I wrote a program to copy certain thread on a daily basis and store them on my server for later reading.
For some reason, one of those forum let me browse it no problem but when I used my script, I get a "denied access type page". I contacted the Webmaster and he assured me that my IP was not banned... What can it be? Is there a bad exchange between the script and the Web Page?
Here is the script that gets the Web page. It works before with other forums.
Code:
use LWP::UserAgent; my $URL = 'http://passionvoile.forumcanada.net'; print "$path <br> Testing : $URL <br>"; my $ua = LWP::UserAgent->new( agent => "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 GTB7.1", ); my $response = $ua->get($URL, Referer => "http://google.com/search/"); if (!$response->is_success) { print $response->status_line; # imprime le code d'erreur si problème. } my $html = $response->decoded_content; print $html; # this is how I know the actual page as not been copy but an denied error page was given. $content = $html; open (DATABASE, ">$path/pages_web/elie-$pare_date.html"); print DATABASE "$content"; close (DATABASE); exit;
Yves
Comment