0
我想使用PHP將以下HTML中的記錄讀入變量。做這個的最好方式是什麼?示例HTML代表兩條記錄。使用PHP解析HTML DOM
結果備案1:
rank = 1 tag = LLG8V2QQ name = Pat level = 11 league = 1 trophies = 4154 donations = 578 role = Elder
<div class="clan__rowContainer">
<div class="clan__row">
#1
</div>
<div class="clan__row">
<a class="ui__blueLink" href='/profile/LLG8V2QQ'>Pat</a>
</div>
<div class="clan__row">
<span class="clan__playerLevel">11</span>
</div>
<div class="clan__row">
<div class="clan__leagueContainer">
<div class="league__1"></div>
</div>
</div>
<div class="clan__row">
<div class="clan__cup">4154</div>
</div>
<div class="clan__row">578</div>
<div class="clan__row">
Elder
</div>
</div>
<div class="clan__rowContainer">
<div class="clan__row">
#2
</div>
<div class="clan__row">
<a class="ui__blueLink" href='/profile/299GGR2J'>Erikson</a>
</div>
<div class="clan__row">
<span class="clan__playerLevel">11</span>
</div>
<div class="clan__row">
<div class="clan__leagueContainer">
<div class="league__1"></div>
</div>
</div>
<div class="clan__row">
<div class="clan__cup">4081</div>
</div>
<div class="clan__row">248</div>
<div class="clan__row">
Member
</div>
</div>
你可以考慮[捲曲](HTTP ://php.net/manual/en/book.curl.php)。 – Pyromonk
你嘗試過什麼,根據你的PHP代碼? – cfnerd