perl - Downloading or requesting a page using a proxy list? -
i wondering if possible request internet page server via proxy taken proxy list.
i don't know exact terms, i'll explain want: there feature in website counts ips or alike (perhaps cookies), such visitors counter. i'd "fool" "entering" page using many proxies. use tor, that's work - want visit page, let counter or whatever in page know visited, , that's all.
i don't know tags add, had little experiments perl think direction, although couldn't find solution problem.
thank in advance.
you want this:
#/usr/bin/perl use strict; use warnings; use lwp::useragent; $url = shift || 'http://www.google.com'; $a = lwp::useragent->new; $a->agent('mozilla/5.0'); $a->timeout(20); while (<data>) { $a->proxy( ['http'], $_ ); warn "failed page proxy $_\n" unless $a->get( $url )->is_success; } __data__ http://85.214.142.3:8080 http://109.230.245.167:80 http://211.222.204.1:80
the code doesn't require explanations. lwp::useragent allows specifying proxy server.
loop through list of proxies, wanted page , you're done.
Comments
Post a Comment