Home  >  Article  >  Backend Development  >  PHP 揁欑▼ | 宁涔嫔

PHP 揁欑▼ | 宁涔嫔

WBOY
WBOYOriginal
2016-07-13 17:35:542054browse

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,...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn