- $host="www.ite5e.com";
- $fp = fsockopen("$host", 80, $errno, $errstr, 30);
- if (!$fp) {
- echo "$errstr ($errno)
";
- } else {
- $out = "GET / HTTP/1.1
";
- $out .= "ホスト: $host
";
- $out .= "接続: 閉じる
";
- }
-
- fwrite($fp, $out);
- $i=0;
- while($i<2)
- {
- $i ;
- $ con.=fread( $fp,500);
- }
- //
- echo $con;
- //定取出字数
- preg_match("/Content-Length:.?(d )/", $con, $matches);
- $size = $matches[1];
- echo $size;
-
-
http://www.bkjia.com/PHPjc/486166.html
www.bkjia.comtruehttp://www.bkjia.com/PHPjc/486166.html技術記事 ?php $host="www.ite5e.com"; $fp = fsockopen("$host", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)br /"; } else { $out = "GET / HTTP/1.1"; $out .= "ホスト: $host"; $ou...