Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- define('_IN_JOHNCMS', 1);
- $from = 'ADMIN';
- $user_id = '1';
- $rootpath = '';
- require('incfiles/core.php');
- @set_time_limit(6000);
- function userAgent() {
- $userAgent = array('NokiaN73-2/3.0-630.0.2 Series60/3.0 Profile/MIDP-2.0 Configuration/CLDC-1.1');
- return $userAgent[rand(0,0)];
- }
- function grab_link($url,$cookie='',$user_agent='',$header='') {
- if(function_exists('curl_init')){
- $ch = curl_init();
- $headers[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
- $headers[] = 'Accept-Language: en-us,en;q=0.5';
- $headers[] = 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7';
- $headers[] = 'Keep-Alive: 300';
- $headers[] = 'Connection: Keep-Alive';
- $headers[] = 'Content-type: application/x-www-form-urlencoded;charset=UTF-8';
- curl_setopt($ch, CURLOPT_URL, $url);
- if($user_agent)curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
- else curl_setopt($ch, CURLOPT_USERAGENT, userAgent());
- if($header)
- curl_setopt($ch, CURLOPT_HEADER, 1);
- else
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com.vn/search?hl=vi&client=firefox-a&rls=org.mozilla:en-US:official&hs=hKS&q=video+clip&start=20&sa=N');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- if(strncmp($url, 'https', 6)) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- if($cookie)curl_setopt($ch, CURLOPT_COOKIE, $cookie);
- curl_setopt($ch, CURLOPT_TIMEOUT, 100);
- $html = curl_exec($ch);
- $mess_error = curl_error($ch);
- curl_close($ch);
- }
- else {
- $matches = parse_url($url);
- $host = $matches['host'];
- $link = (isset($matches['path'])?$matches['path']:'/').(isset($matches['query'])?'?'.$matches['query']:'').(isset($matches['fragment'])?'#'.$matches['fragment']:'');
- $port = !empty($matches['port']) ? $matches['port'] : 80;
- $fp=@fsockopen($host,$port,$errno,$errval,30);
- if (!$fp) {
- $html = "$errval ($errno)<br />\n";
- } else {
- $rand_ip = rand(1,254).".".rand(1,254).".".rand(1,254).".".rand(1,254);
- $out = "GET $link HTTP/1.1\r\n".
- "Host: $host\r\n".
- "Referer: http://www.google.com.vn/search?hl=vi&client=firefox-a&rls=org.mozilla:en-US:official&hs=hKS&q=video+clip&start=20&sa=N\r\n".
- "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n";
- if($cookie) $out .= "Cookie: $cookie\r\n";
- if($user_agent) $out .= "User-Agent: ".$user_agent."\r\n";
- else $out .= "User-Agent: ".userAgent()."\r\n";
- $out .= "X-Forwarded-For: $rand_ip\r\n".
- "Via: CB-Prx\r\n".
- "Connection: Close\r\n\r\n";
- fwrite($fp,$out);
- while (!feof($fp)) {
- $html .= fgets($fp,4096);
- }
- fclose($fp);
- }
- }
- return $html;
- }
- if (isset($_POST['url'])){
- $refid= abs(intval($_POST['chuyenmuc']));
- $link = $_POST['url'];
- $nd = grab_link($link);
- $btit = '<title>';
- $ktit ='</title>';
- preg_match('/<title>(.*?)<\/title>/', $nd, $tit);
- $tieude = str_replace('- mPlay.Pro', '', $tit[1]);
- preg_match('/<\!-- Tiêu đề -->(.*?)<div class="phai">/is', $nd, $content);
- $noidung = str_replace('<div class="list1">', '', $content[1]);
- $noidung = html_entity_decode($noidung,ENT_QUOTES,'UTF-8');
- $noidung = str_replace('<font color="#FFFFFF">', '<font color="red">', $noidung);
- mysql_query("INSERT INTO `forum` SET
- `refid` ='$refid',
- `type` ='t',
- `hienthi` = '1',
- `time` ='". time() ."',
- `user_id` ='$user_id',
- `from` ='$from',
- `text` ='$tieude',
- `nametopic` = '".rw($tieude)."',
- `soft` ='',
- `edit` ='',
- `curators` =''
- ") or exit(__LINE__ . ':' . mysql_error());
- $rid = mysql_insert_id();
- mysql_query("INSERT INTO `forum` SET
- `refid` ='$rid',
- `type` ='m',
- `time` ='". time() ."',
- `user_id` ='$user_id',
- `from` ='$from',
- `ip` ='". core::$ip ."',
- `soft` = 'BOT',
- `ip_via_proxy` ='". core::$ip_via_proxy ."',
- `text` ='". mysql_real_escape_string($noidung) ."',
- `edit` ='',
- `curators` =''
- ") or exit(__LINE__ . ':' . mysql_error());
- echo '<div style="color:green">leech <b>'.$tieude.'</b> thành công</div>';
- }
- echo 'Nhap 1 link tu mplay.pro<br/><form action ="" method="post"><br>
- •Link: *<br/><input type="text" name="url" value="" size="15"/>';
- echo '<br/>Chuyện mục<br/><select name="chuyenmuc">';
- $q=mysql_query("select text,id from forum where type = 'r' order by realid ASC");
- while($cm=mysql_fetch_assoc($q)){
- echo '<option value="'.$cm['id'].'">'.$cm['text'].'</option>';
- }
- echo '</select><br/><input type="submit" value="Gửi bài viết"></form>';
- echo'<hr>FB <a href="https://www.facebook.com/taiw96">Kí Ức Theo Mưa</a>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement