내가 자꾸 까먹어서 쓰는 개발 이야기/PHP
원격 html 소스 읽어오기
$url = "http://macmall.co.kr/oneborn.html"; $info = parse_url($url); $send = "POST " . $info["path"] . " HTTP/1.1\r\n" . "Host: " . $info["host"] . "\r\n" . "Content-type: application/x-www-form-urlencoded\r\n" . "Content-length: " . strlen($info["query"]) . "\r\n" . "Connection: close\r\n\r\n" . $info["query"]; $fp = fsockopen($info[host], 80); fputs($fp, $send); $start = false; $retVal = ""; w..
2008. 6. 25. 15:47
최근댓글