• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Admin

Well-Known Member
Staff member
Administrator
Tạo 1 tập tin ví dụ tuoitreit_index.php dán code này vào
PHP:
<?php
$diachi = 'https://picasaweb.google.com/lh/photo/oSbE7LmJg7_RD0sEQ7jyW_hOCqZ-rWSgN0iX_85P3x4?feat=directlink';
//Hoặc link này cũng được
// $diachi = 'https://picasaweb.google.com/111132248436048010579/SongChetCungVeNha?authkey=Gv1sRgCJWmmNC7yoWadQ';
function laydulieu($diachi)
{
$ch = curl_init();  
$timeout = 15;  
curl_setopt($ch, CURLOPT_URL, $url);  
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)");  
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);  
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);  
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);  
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);  
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);  
$dulieu = curl_exec($ch);  
curl_close($ch);  
return $dulieu;    
}

function tuoitreit($diachi)
 {
      $link = file_get_contents($diachi);
    if (preg_match_all('#image/jpeg#i',$link,$output) == true)
        {
            $link = explode('"type":"image/jpeg"},{"url":"',$link);
            $link = explode('","',$link[1]);
            $link = urldecode($link[0]);
        }
    else if (preg_match_all('#image/gif#i',$link,$output) == true)
        {
            $link = explode('"type":"image/gif"},{"url":"',$link);
            $link = explode('","',$link[1]);
            $link = urldecode($link[0]);
             }
    else
        {
            $link = explode('"type":"image/png"},{"url":"',$link);
            $link = explode('","',$link[1]);
            $link = urldecode($link[0]);
            }
          return $link;
}
$link = tuoitreit($diachi);
echo $link;
exit;
?>
Lưu lại là xong!
Chúc các bạn thành công!
 

Facebook Comments

New posts New threads New resources

Back
Top