ForumLeecher.com





Example URL : http://Tamilterminal.com/forumdisplay.php?f=34
End with Trailing Slash(/)
Example URL : http://www.123moviez.com/
Leave it blank if you don't want any filter
write keywords separated by comma ','




url:-->", $furl; $filter = ','.$filter1."," ; $bad_words = explode(',', $filter1); echo "
Forum Leeching Started
"; $turl = explode("forumdisplay",$furl); // echo "
TURL --> ".$turl[0]; $slurl = $turl[0]."login.php"; $post_fields = array( 'vb_login_username' => $suser, 'vb_login_password' => $spass, 'do' => "login", 's' => '', 'cookieuser' => '1' ); $time_start = microtime(true); login($slurl,$post_fields); $links = getlinks($furl,$spage,$lpage); // var_dump($links); for($i= 0;$i < sizeof($links);$i++) { // echo "Links:->".$links[$i]["text"].":->".$links[$i]["href"]."
"; $cturl = $turl[0].$links[$i]["href"]; echo "curl:->".$cturl; $lcontent = getcontent($cturl); $title = $links[$i]["text"]; $content = getthreadcontent($lcontent); // echo $title."
"; // echo $content."
"; posting($title,$content,$tweb,$fnum,$tuser,$tpass,$bad_words); } echo "
Forum Leeching Process Ended
"; $time_end = microtime(true); $time = $time_end - $time_start; echo "
Time Taken to Execute This Script:-> $time seconds
\n"; } echo "
Forum Leeching Finished
"; //---------------------------------- function getthreadcontent($content) { $wsql = new htmlsql(); // echo "results:-->". $content."
"; // connect to a string html if (!$wsql->connect('string', $content)) { print 'Error while connecting: ' . $wsql->error; exit; } $content = $wsql->_get_between($content,'',''); // echo "
Thread content". $content. "
"; return $content; } //------------------------------------------ function login($lurl,$postfields) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$lurl); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_followlocation, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$postfields); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_COOKIEJAR,'cookie.txt'); $result= curl_exec($ch); curl_close ($ch); // echo $result; } //--------------------------------- function getlinks($links,$spage,$lpage) { while($lpage >= $spage) { $nlink = $links."&order=desc&page=".$lpage; // echo $nlink."
"; $result = getcontent($nlink); $wsql = new htmlsql(); // connect to a URL if (!$wsql->connect('string',$result)) { print 'Error while connecting: ' . $wsql->error; exit; } if (!$wsql->query('SELECT * FROM a where $id >= "thread_title"')) { print "Query error: " . $wsql->error; exit; } $tlinks[] = array(); foreach($wsql->fetch_array() as $row) { $tlinks[] = $row; // echo $row["href"]."
"; } $lpage = $lpage - 1 ; } return $tlinks; } //------------------------------ function getcontent($surl) { $ch1 = curl_init(); curl_setopt($ch1, CURLOPT_URL,$surl); curl_setopt($ch1, CURLOPT_followlocation, 1); curl_setopt($ch1, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch1, CURLOPT_COOKIEFILE,'cookie.txt'); $result1= curl_exec($ch1); curl_close ($ch1); return $result1; } // ---------------------------------- function posting($title,$content,$tweb,$fnum,$tuser,$tpass,$bad_words) { foreach ($bad_words as $naughty) { $content = str_ireplace($naugty, "*****", $content); } $forumid = $fnum; $post_fields =array( 'vb_login_username' => $tuser, 'vb_login_password' => $tpass, 'do' => "login", 's' => '', ); $lurl = $tweb."login.php"; // echo $lurl; $curl_url = $tweb."newthread.php?do=newthread&f=".$forumid; // echo $curl_url; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$lurl); curl_setopt($ch, CURLOPT_POST, 4); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_COOKIEJAR,"cookie1.txt"); $result= curl_exec ($ch); curl_close ($ch); // echo $result; $ch3 = curl_init(); curl_setopt($ch3,CURLOPT_URL,$curl_url); curl_setopt($ch3,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch3,CURLOPT_CONNECTTIMEOUT,"120"); curl_setopt ($ch3, CURLOPT_HEADER, false ); curl_setopt($ch3,CURLOPT_COOKIEFILE,"cookie1.txt"); $souvik12345 = curl_exec($ch3); $error=curl_error($ch3); curl_close($ch3); preg_match('%name="securitytoken" value="(.*)"\ /\>%',$souvik12345,$security123); $post_fields123 = array( 'subject' => $title, 'message' => nl2br(htmlspecialchars_decode($content)), 'wysiwyg' => 1, 'iconid' => 0, 'securitytoken' => $security123[1], 'f' => $forumid, 'do' => 'postthread', 'posthash' => '8d8769e64433fe28a72a4a86cb8d808', 'loggedinuser' => '1', 'sbutton' => 'Submit New Thread', 'parseurl' => '1', ); $ch2 = curl_init(); curl_setopt($ch2,CURLOPT_URL,$curl_url); curl_setopt($ch2,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch2,CURLOPT_CONNECTTIMEOUT,"120"); curl_setopt($ch2, CURLOPT_POSTFIELDS, $post_fields123); curl_setopt ( $ch2, CURLOPT_HEADER, false ); curl_setopt($ch2,CURLOPT_COOKIEFILE,"cookie1.txt"); $souvik1234 = curl_exec($ch2); $error=curl_error($ch2); curl_close($ch2); // echo $souvik1234; } // ----------------Functions Ended ?>