페이지파싱을 배우는데..

"�׷� �Խ��� ���� �ۼ��� "

아래 소스를 그대로 적용했는데... 화면에 보여지는건 위처럼 나오네요...~

유창화님의 소스인데.. 그대로 해도 전 안되네요...

어느부분이 잘못된걸까요?


<?php

$url = 'http://sir.co.kr/bbs/new.php';
$text = file_get_contents($url);

$temp = @explode('<colgroup width="60">', $text);
$temp = @explode('</form>', $temp[1]);

$text = $temp[0];

preg_match_all("`<tr align='center' height='30'><td align='left'>.*<a href='new\.php\?gr_id=.+'>(.+)</a>.*</td><td align='left'>.*<a href='new\.php\?bo_table=.+'>(.+)</a>.*</td><td.*<a href='board\.php\?.+&wr_id=.+'>(.+)</a>.*</td><td>.*<a href=\"javascript:;\" onClick=\"showSideView\(.+\);\".+>(.+)</a>.*</td>.*</tr>`iU", $text, $match);

if (is_array($match[1])){

$text = '<table><tr><td>그룹</td><td>게시판</td><td>제목</td><td>작성자</td></tr>';
foreach($match[1] as $k => $v){

$text .= '<tr><td>' . $v . '</td><td>' . $match[2][$k] . '</td><td>' . $match[3][$k] . '</td><td>' . str_replace("../", 'http://sir.co.kr/', $match[4][$k]) . '</td></tr>';
}
$text .= '</table>';
}

echo $text;

?>
|

댓글 2개

언어셋 지정하세요.
맨위에 아래내용을 추가했는데..이렇게 하면 언어셋 지정하는것 맞는건가요?

<meta http-equiv="content-type" content="text/html; charset=euc-kr">
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
14년 전 조회 977
14년 전 조회 1,722
14년 전 조회 974
14년 전 조회 904
14년 전 조회 888
14년 전 조회 988
14년 전 조회 776
14년 전 조회 709
14년 전 조회 744
14년 전 조회 1,084
14년 전 조회 976
14년 전 조회 799
14년 전 조회 1,071
14년 전 조회 2,914
14년 전 조회 1,264
14년 전 조회 1,158
14년 전 조회 1,550
14년 전 조회 1,501
14년 전 조회 771
14년 전 조회 1,042