WEB开发网
开发学院WEB开发PHP PHP破解163相册外连 阅读

PHP破解163相册外连

 2008-12-16 16:21:44 来源:WEB开发网   
核心提示:<?phpob_start();$img=$_GET['url'];$host=$path=str_replace('http://','',$img);$host=explode('/',$host);$host=$host[0];$path=st

<?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, 30);
if ($fp)
{
@fputs($fp, "GET $path HTTP/1.1\r\n");
@fputs($fp, "Host: $host\r\n");
@fputs($fp, "Accept: */*\r\n");
@fputs($fp, "Referer: http://$host/\r\n");
@fputs($fp, "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)\r\n");
@fputs($fp, "Connection: Close\r\n\r\n");
}

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

Tags:PHP 相册

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接