<?php list($head,$body) = httpRequest("http://www.yahoo.co.jp"); function httpRequest($url) { $purl = parse_url($url); if (isset($purl["query"])) { $purl["query"] = "?".$purl["query"]; } else { $purl["query"] = ""; } if (!isset($purl["port"])) { $purl["port"] = 80; } $request = "GET ".$purl["path"].$purl["query"]." HTTP/1.0\r\n"; $request .= "Host: ".$purl["host"]."\r\n"; $request .= "\r\n"; // タ