This is a script to pretty much download every book that the guys at info "borrowed" from Wiley etc. :)
Copy the below text and save it as temp.pl
#just an example of what happens when you steal from the publishers and number your downloads sequentially :)
use LWP::UserAgent qw( );
use LWP::Simple;
my $link;
my $cnt;
for ($cnt = 1; $cnt <= 6500; $cnt++) {
my $url = 'http://it-ebooks.info/book/'.$cnt.'/';
my $content = get $url;
die "Couldn't get $url" unless defined $content;
# Then go do things with $content, like this:
my @temp=split '\n',$content;
foreach $line (@temp) {
if($line =~ /go.php/) {
my @arr=split '"',$line;
$link=substr($arr[3], 1);
last;
}
}
$link='http://it-ebooks.info/'.$link;
print "iteration::$cnt:>>".$link."\n";
my $ua = LWP::UserAgent->new();
my $cnt1 = %{%{$ua->head( $link )}->{'_headers'}}->{'content-disposition'};
$cnt1 =~ m/filename=(.*)/;
print "File name is: $1\n";
#Save File
my $status = getstore($link, $1);
if ( is_success($status) ){
print "File $1 Saved Correctly !\n";
}else{
print "Error saving $1!\n";
}
$link="";
}