CuDemVN.Wap.Sh



![]() | ![]() ![]() ![]() |
Hướng Dẫn Sử Dụng:
$dir thư mục lưu ảnh trên host
$cat điền link ngay con trỏ
$id thì lấy tại đây
phần bôi đen
→ xong, chạy code, cái này chỉ leech top 300 của mỗi độ phân giải bởi vậy lâu lâu hãy leech 1 lần, host free thì nên thường xuyên zip folder "check-i" và lưu vào máy vì đây là nơi đối chiếu xem đã leech chưa để tránh trùng
<?php
//===config===//
$dir = 'Upload/storage/hinh-nen/240x320';
$cat = 'http://gallery.mobile9.com/c/nokia-c5-wallpapers_2897/1/';
$id = '210';
//===config===//
$ua = 'Opera/9.80 (Series 60; Opera Mini/7.0.32400/28.3392; U; vi) Presto/2.8.119 Version/11.10';
if(isset($_GET['download'])){
$dirs = explode('/', $dir);
foreach($dirs as $i){
$r = (!isset($r)?$i:$r.'/'.$i);
@mkdir($r, 0777);
}
@mkdir('check-i', 0777);
$url = $_GET['download'];
$name = basename($url);
if(!file_exists('check-i/'.$name)){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
$im = curl_exec($ch);
curl_close($ch);
file_put_contents($dir.'/'.$name, $im);
file_put_contents('check-i/'.$name, 'ok');}
}else{
function laynoidung($noidung, $start, $stop) {
$bd = strpos($noidung, $start);
$kt = strpos(substr($noidung, $bd), $stop) + $bd;
$content = substr($noidung, $bd, $kt - $bd);
return $content;
}
$url = $cat.'?pg='.$_GET['pg'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
$content = curl_exec($ch);
curl_close($ch);
$content = laynoidung($content, '<div class="content">', '</div><div class="clr"></div>');
$content = str_replace('/thumb/'.$id.'//', '/media/'.$id.'/', $content);
$content = str_replace('<img src="', '<img src="?download=', $content);
$content = str_replace($cat, '', $content);
echo $content;
}
?>
Nguồn: Quốc Trung

Đánh giá: 4.5/ 5, 669 bình chọn
