PHP鐮磋В163鐩稿唽澶栬繛_PHP鏁欑▼ | 甯涔嬪

WBOY
发布: 2016-07-13 17:35:54
原创
2088 人浏览过

ob_start();
$img=$_GET[url];

$host=$path=str_replace(http://,,$img);
$host=explode(/,$host);
$host=$host[0];
$path=strstr($path,/);
$fp = fsockopen($host, 80, $errno, $errstr, 30);
if ($fp)
{
@fputs($fp, "GET $path HTTP/1.1 ");
@fputs($fp, "Host: $host ");
@fputs($fp, "Accept: */* ");
@fputs($fp, "Referer: http://$host/ ");
@fputs($fp, "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ");
@fputs($fp, "Connection: Close ");
}

$Content = ;
while ($str = fread($fp, 4096))
$Content .= $str;
@fclose($fp);
$pos=strpos($Content," ");
$head=substr($Content,0,$pos);
$text=substr($Content,$pos+4);
header("Content-Type: image/jpeg");
echo $text;
?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/508286.htmlTechArticle?php ob_start(); $img=$_GET[url]; $host=$path=str_replace(http://,,$img); $host=explode(/,$host); $host=$host[0]; $path=strstr($path,/); $fp = fsockopen($host, 80, $errno, $errstr,...
相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板