#!/usr/bin/perl # mikes down and dirty cut and paste perl code emporium. # This works for me.. When I have an Adword I want to rise to the top. Run # from multiple IP's. (servers, clients..) use LWP::UserAgent ; use HTTP::Request; use HTTP::Response; use URI::Heuristic; $loop = 0 ; # Gotta start somewhere $max = 200 ; # times to loop $inc = 10 ; # hit increment $start = 0 ; # Again, gotta start somewhere while($loop < $max) { #This example searches for web hosting companies. # and raises the link for 'BubbalandTech.Com' for example. $targetstring = "BubbalandTech.com" ; $host = "www.google.com/search?q=web+hosting&hl=en&start=$start&sa=N" ; # This should be all you have to edit... (see above 2 lines) &getit ; &parseit ; $loop++ ; $start = $start + $inc ; sleep 20 ; print "LOOP: $loop $host\n" ; } ; sub getit { unlink("/tmp/google") ; $url = URI::Heuristic::uf_urlstr($host) ; #print "HTTP $url \n" ; my $ua = LWP::UserAgent->new() ; $ua->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Cox High Speed)") ; #print "looking for $url \n" ; my $req = HTTP::Request->new(GET => $url) ; $req->referer("http://geeklabs.com") ; my $response = $ua->request($req) ; if ($response->is_error()) { print "ERROR $host" ; $s = $response->status_line ; $s =~ s/\'//g ; print "FAILED: $s\n" ; } else { my $count ; my $bytes ; my $content = $response->content() ; $bytes = length $content ; #$count = ($content =~ tr/\\n/\n/) ; $content =~ s/\