Good afternoon all.
I have an application that has a web interface that I need to scrape. I have a basic scrape working OK but I'm struggling to get the sections of code I want on their own.
This is the code I need to scrape from (applogies for the very badly formatted HTML but it is nothing I can change.)
HTML Code:
<html>
<head>
</head>
<body>
<b>Active Jobs</b>
<table>
<tr>
<th align="right">Priority</th>
<th align="left">Job Name</th>
<th align="left">Owner</th>
<th align="left">Progress</th>
<tr><td align="right">1 <td align="left">This is my Job Name <th align="left">Tom <th align="left">63%
</tr>
</table>
<br><br><br>
<b>Inactive Jobs</b>
<table>
<tr>
<th align="right">Priority</th>
<th align="left">Job Name</th>
<th align="left">Owner</th>
<th align="left">Progress</th>
<tr><td align="right">1 <td align="left">This is my Job Name2 <th align="left">Tom <th align="left">100% <tr><td align="right">1 <td align="left">This is my Job Name3 <th align="left">Tom <th align="left">100% <tr><td align="right">1 <td align="left">This is my Job Name4 <th align="left">Tom <th align="left">100%
</tr>
</table>
</body>
</html>
I would love to be able to get the bits of code below into separate strings in PHP. I was going to use preg_match() but thought there is possibly a simpler way...
HTML Code:
<tr><td align="right">1 <td align="left">This is my Job Name <th align="left">Tom <th align="left">63%
</tr>
HTML Code:
<tr><td align="right">1 <td align="left">This is my Job Name2 <th align="left">Tom <th align="left">100% <tr><td align="right">1 <td align="left">This is my Job Name3 <th align="left">Tom <th align="left">100% <tr><td align="right">1 <td align="left">This is my Job Name4 <th align="left">Tom <th align="left">100%
</tr>
Thanks in advance.
Tom
|