如何从此html元素中选择所有<tr>
,然后
我想在php中使用从这里获得的信息作为数组或对象
提前致谢
<tbody><tr>
<td colspan="6" class="title">Applications</td>
</tr>
<tr>
<td class="header-left"><small>Path</small></td>
<td class="header-left"><small>Version</small></td>
<td class="header-center"><small>Display Name</small></td>
<td class="header-center"><small>Running</small></td>
<td class="header-left"><small>Sessions</small></td>
<td class="header-left"><small>Commands</small></td>
</tr>
<tr>
<td class="row-left" rowspan="2" bgcolor="#FFFFFF"><small><a href="/">/</a></small></td>
<td class="row-left" rowspan="2" bgcolor="#FFFFFF"><small><i>None specified</i></small></td>
<td class="row-left" rowspan="2" bgcolor="#FFFFFF"><small>Welcome to Tomcat</small></td>
<td class="row-center" rowspan="2" bgcolor="#FFFFFF"><small>true</small></td>
<td class="row-center" rowspan="2" bgcolor="#FFFFFF"><small><a href="/manager/html/sessions?path=/&org.apache.catalina.filters.CSRF_NONCE=7DF475B8EF3807C4BCA8651FEBA676EA">0</a></small></td>
<td class="row-left" bgcolor="#FFFFFF">
<small>Start</small>
<form class="inline" method="POST" action="/manager/html/stop?path=/&org.apache.catalina.filters.CSRF_NONCE=7DF475B8EF3807C4BCA8651FEBA676EA"> <small><input value="Stop" type="submit"></small> </form>
<form class="inline" method="POST" action="/manager/html/reload?path=/&org.apache.catalina.filters.CSRF_NONCE=7DF475B8EF3807C4BCA8651FEBA676EA"> <small><input value="Reload" type="submit"></small> </form>
<form class="inline" method="POST" action="/manager/html/undeploy?path=/&org.apache.catalina.filters.CSRF_NONCE=7DF475B8EF3807C4BCA8651FEBA676EA"> <small><input value="Undeploy" type="submit"></small> </form>
</td>
</tr><tr>
<td class="row-left" bgcolor="#FFFFFF">
<form method="POST" action="/manager/html/expire?path=/&org.apache.catalina.filters.CSRF_NONCE=7DF475B8EF3807C4BCA8651FEBA676EA">
<small>
<input value="Expire sessions" type="submit"> with idle ≥ <input name="idle" size="5" value="30" type="text"> minutes
</small>
</form>
</td>
</tr>
<tr>
<td class="row-left" rowspan="2" bgcolor="#C3F3C3"><small><a href="/item1/">/item1</a></small></td>
<td class="row-left" rowspan="2" bgcolor="#C3F3C3"><small><i>None specified</i></small></td>
<td class="row-left" rowspan="2" bgcolor="#C3F3C3"><small> </small></td>
<td class="row-center" rowspan="2" bgcolor="#C3F3C3"><small>false</small></td>
<td class="row-center" rowspan="2" bgcolor="#C3F3C3"><small><a href="/manager/html/sessions">0</a></small></td>
<td class="row-left" rowspan="2" bgcolor="#C3F3C3">
<form class="inline" method="POST" action="item1Start">
<small>
<input value="Start" type="submit">
</small>
</form>
<small>Stop</small>
<small>Reload</small>
<form class="inline" method="POST" action="item1Undeploy">
<small>
<input value="Undeploy" type="submit">
</small>
</form>
</td>
</tr>
<tr></tr>
<tr>
<td class="row-left" rowspan="2" bgcolor="#FFFFFF"><small><a href="/item2/">/item2</a></small></td>
<td class="row-left" rowspan="2" bgcolor="#FFFFFF"><small><i>None specified</i></small></td>
<td class="row-left" rowspan="2" bgcolor="#FFFFFF"><small> </small></td>
<td class="row-center" rowspan="2" bgcolor="#FFFFFF"><small>false</small></td>
<td class="row-center" rowspan="2" bgcolor="#FFFFFF"><small><a href="/manager/html/sessions">0</a></small></td>
<td class="row-left" rowspan="2" bgcolor="#FFFFFF">
<form class="inline" method="POST" action="/manager/html/sessions?path=/manager"> <small><input value="Start" type="submit"></small> </form>
<small>Stop</small>
<small>Reload</small>
<form class="inline" method="POST" action="/manager/html/sessions?path=/manager">
<small>
<input value="Undeploy" type="submit">
</small>
</form>
</td>
</tr>
<tr></tr>
<tr>
<td class="row-left" rowspan="2" bgcolor="#C3F3C3"><small><a href="/manager/">/manager</a></small></td>
<td class="row-left" rowspan="2" bgcolor="#C3F3C3"><small><i>None specified</i></small></td>
<td class="row-left" rowspan="2" bgcolor="#C3F3C3"><small>Tomcat Manager Application</small></td>
<td class="row-center" rowspan="2" bgcolor="#C3F3C3"><small>true</small></td>
<td class="row-center" rowspan="2" bgcolor="#C3F3C3"><small><a href="/manager/html/sessions?path=/manager&org.apache.catalina.filters.CSRF_NONCE=7DF475B8EF3807C4BCA8651FEBA676EA">33</a></small></td>
<td class="row-left" bgcolor="#C3F3C3">
<small>
Start
Stop
Reload
Undeploy
</small>
</td>
</tr><tr>
<td class="row-left" bgcolor="#C3F3C3">
<form method="POST" action="/manager/html/expire?path=/manager&org.apache.catalina.filters.CSRF_NONCE=7DF475B8EF3807C4BCA8651FEBA676EA">
<small>
<input value="Expire sessions" type="submit"> with idle ≥ <input name="idle" size="5" value="30" type="text"> minutes
</small>
</form>
</td>
</tr>
</tbody>