【PHP】下らねぇ質問はID出して書き込みやがれ 97
レス数が900を超えています。1000を超えると表示できなくなるよ。
サンプルね
文字コードもエラーに関係するからちゃんと変換してあげる事
■test.php
$url = "index.html";
$toEnc = "UTF-8";
$file = file_get_contents($url);
$enc = mb_detect_encoding($file, "auto", true);
$file = mb_convert_encoding($file, $toEnc, $enc);
$doc = new DOMDocument();
$res = $doc->loadHTML($file);
echo $doc->getElementById("test")->tagName;
■ index.html
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>New Document</title></head>
<body>
<div>
<form action="" method="post" id="test">
<input type="hidden" name="a" value="1">
<input type="hidden" name="b" value="2">
<input type="hidden" name="c" value="3">
<input type="hidden" name="d" value="4">
<input type="hidden" name="e" value="5">
<input type="submit" value="send">
</form>
</div>
</body>
</html>
レス数が900を超えています。1000を超えると表示できなくなるよ。