http://7xigfd.com1.z0.glb.clouddn.com/wp-content/uploads/2015/08/134.jpg
function image($url, $referer_url) {
//$url = $this->input->get('url');
$dir = pathinfo($url);
$host = $dir['dirname'];
$refer = $host . '/';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_REFERER, $refer);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, $referer_url);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"); //類比使用者使用的瀏覽器
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); //在發起串連前等待的時間,如果設定為0,則無限等待
curl_setopt($ch, CURLOPT_TIMEOUT, 30); //設定逾時限制防止死迴圈
$data = curl_exec($ch);
curl_close($ch);
$ext = strtolower(substr(strrchr($url, '.'), 1, 10));
$types = array(
'gif' => 'image/gif',
'jpeg' => 'image/jpeg',
'jpg' => 'image/jpeg',
'jpe' => 'image/jpeg',
'png' => 'image/png',
);
$type = $types[$ext] ? $types[$ext] : 'image/jpeg';
header("Content-type: " . $type);
echo $data;
}這種方法不行 有沒有可用的方法?
回複討論(解決方案)
echo "";
這樣不行嗎?
echo "";
這樣不行嗎?
你試了可以嗎?
總不能無中生有吧?
總不能無中生有吧?
http://7xigfd.com1.z0.glb.clouddn.com/wp-content/uploads/2015/08/135.jpg 這張圖打不開吧
總不能無中生有吧?
http://knewsmart.com/applefan/9423/ 原圖在這裡,開啟這個然後上面那張圖就可以開啟了
圖片不存在或沒有許可權訪問。
圖片不存在或沒有許可權訪問。
有辦法hack嗎?
我%……&*))(*
我試過用http://7xigfd.com1.z0.glb.clouddn.com作來源就是沒用knewsmart.com
快被自己蠢哭了
非常感謝!