PHP cracking 163 photo album external connection, read PHP cracking 163 photo album external connection ,? Phpob_start (); $ img = $ _ GET ["> <LINKhref =" http://www.php100.com//statics/style/headfloor_950_081205.css "type = text/cssrel = stylesheet
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 ");
}
$ Content = '';
While ($ str = freactive ($ fp, 4096 ))
$ Content. = $ str;
@ Fclose ($ fp );
$ Pos = strpos ($ Content, "\ r \ n ");
$ Head = substr ($ Content, 0, $ pos );
$ Text = substr ($ Content, $ pos + 4 );
Header ("Content-Type: image/jpeg ");
Echo $ text;
?>