태그 갯수를 알아보는 페이지 정보
태그 갯수를 알아보는 페이지
본문
            
            
                        파일명 : tablecheck.php
<?
@extract($_GET);
if (!$url) {
echo "?url= 값을 넘겨주세요.";
exit;
}
$s = implode(" ", file($url, "r"));
$s = strtolower($s);
$table1 = substr_count($s, "<table");
$table2 = substr_count($s, "</table");
$tr1 = substr_count($s, "<tr");
$tr2 = substr_count($s, "</tr");
$td1 = substr_count($s, "<td");
$td2 = substr_count($s, "</td");
$form1 = substr_count($s, "<form");
$form2 = substr_count($s, "</form");
$a1 = substr_count($s, "<a ");
$a2 = substr_count($s, "</a");
echo "<br><table>  : ".$table1;
echo "<br></table> : ".$table2;
echo "<br><tr>  : ".$tr1;
echo "<br></tr> : ".$tr2;
echo "<br><td>  : ".$td1;
echo "<br></td> : ".$td2;
echo "<br><form>  : ".$form1;
echo "<br></form> : ".$form2;
echo "<br><a>  : ".$a1;
echo "<br></a> : ".$a2;
?>
사용법 : http://도메인/tablecheck.php?url=http://주소
결과 :
<table> : 33
</table> : 33
<tr> : 70
</tr> : 69
<td> : 98
</td> : 97
<form> : 2
</form> : 2
<a> : 20
</a> : 20
* 테이블과 관련된 태그 갯수를 알아보고자 하는 경우 유용합니다.
                
                
                <?
@extract($_GET);
if (!$url) {
echo "?url= 값을 넘겨주세요.";
exit;
}
$s = implode(" ", file($url, "r"));
$s = strtolower($s);
$table1 = substr_count($s, "<table");
$table2 = substr_count($s, "</table");
$tr1 = substr_count($s, "<tr");
$tr2 = substr_count($s, "</tr");
$td1 = substr_count($s, "<td");
$td2 = substr_count($s, "</td");
$form1 = substr_count($s, "<form");
$form2 = substr_count($s, "</form");
$a1 = substr_count($s, "<a ");
$a2 = substr_count($s, "</a");
echo "<br><table>  : ".$table1;
echo "<br></table> : ".$table2;
echo "<br><tr>  : ".$tr1;
echo "<br></tr> : ".$tr2;
echo "<br><td>  : ".$td1;
echo "<br></td> : ".$td2;
echo "<br><form>  : ".$form1;
echo "<br></form> : ".$form2;
echo "<br><a>  : ".$a1;
echo "<br></a> : ".$a2;
?>
사용법 : http://도메인/tablecheck.php?url=http://주소
결과 :
<table> : 33
</table> : 33
<tr> : 70
</tr> : 69
<td> : 98
</td> : 97
<form> : 2
</form> : 2
<a> : 20
</a> : 20
* 테이블과 관련된 태그 갯수를 알아보고자 하는 경우 유용합니다.
                        
                추천
                
2
                
    2
댓글 3개
                
                    좋은 팁 감사합니다.....                
                
                
            
                    
                
                    멋진 팁이군요. 감사합니다 ^^
덤으로 화면에서 링크 받아서 확인해볼수있는 링크가 그누보드에도 하나 있으면 좋겠군요. ^^
                    덤으로 화면에서 링크 받아서 확인해볼수있는 링크가 그누보드에도 하나 있으면 좋겠군요. ^^
                
                    감사합니다.
div, span까지 끼워넣어서 해보란 말씀이시죠?!
엇~!! 짝이 안맞는 녀석도 보이네요.^^
ps)서버에서 파일함수를 막아놓은 것인가요??
Warning: file(): URL file-access is disabled in the server configuration in ~~tablecheck.php on line 9
ps2)돌아가는 방법을 찾았습니다.^^
ps3)소켓으로.. http://www.sir.co.kr/bbs/tb.php/g4_tiptech/7452
                    div, span까지 끼워넣어서 해보란 말씀이시죠?!
엇~!! 짝이 안맞는 녀석도 보이네요.^^
ps)서버에서 파일함수를 막아놓은 것인가요??
Warning: file(): URL file-access is disabled in the server configuration in ~~tablecheck.php on line 9
ps2)돌아가는 방법을 찾았습니다.^^
ps3)소켓으로.. http://www.sir.co.kr/bbs/tb.php/g4_tiptech/7452