<?php
$page = <<<EOF
Start of document removed.
<table>
<tr class="tableheadCheckbox">
<th> </th>
<th>Preview</th>
<th><a href="showInbox.do?sortBy=subject&sortOrder=asc"
title="Click here to sort by subject">Subject</a></th>
<th><a href="showInbox.do?sortBy=from&sortOrder=asc"
title="Click here to sort by originator">From</a></th>
<th><a href="showInbox.do?sortBy=received&sortOrder=asc"
title="Click here to sort by receive date"><img src="images/tri1.gif" alt="Down arrow to show ascending sort order" /> Received</a></th>
<th class="noBorderRight"><a href="showInbox.do?sortBy=expires&sortOrder=desc"
title="Click here to sort by expiration date">Expires</a></th>
</tr>
<tbody>
<tr class="tableheadCheckbox">
<td>
<div class="moduleFrmBox">
<input type="checkbox" name="selectedItems" value="22222222" title="Check this message">
</div>
</td>
<td>
<a href="showMessage.do?mmsId=11111111&inboxItemId=22222222" title="View message">
<img src="http://139.2.165.14/MacsService/Macs/ContentService/-removed-.jpg" alt="Thumbnail preview of user submitted image" border="0" />
</a>
</td>
<td>
<a href="showMessage.do?mmsId=11111111&inboxItemId=22222222" title="View message">
Har
</a>
</td>
<td>
+4400000001
</td>
<td>
2008/03/14 19:17
</td>
<td class="noBorderRight">
2008/04/13 20:17
</td>
</tr>
<tr class="tableheadCheckbox">
<td>
<div class="moduleFrmBox">
<input type="checkbox" name="selectedItems" value="33333333" title="Check this message">
</div>
</td>
<td>
<a href="showMessage.do?mmsId=52546530&inboxItemId=33333333" title="View message">
<img src="http://139.2.165.14/MacsService/Macs/ContentService/-removed-.jpg" alt="Thumbnail preview of user submitted image" border="0" />
</a>
</td>
<td>
<a href="showMessage.do?mmsId=52546530&inboxItemId=33333333" title="View message">
FW:
</a>
</td>
<td>
+440000000000
</td>
<td>
2008/03/10 18:56
</td>
<td class="noBorderRight">
2008/04/09 19:56
</td>
</tr>
</tbody>
</table>
End of document removed.
EOF;
$lines = explode("\n", $page);
echo '<textarea style="width:110em;height:400px;">'; print_r($lines); echo '</textarea><br />';
preg_match_all('/href=["\'](showMessage\.do\?mmsId=[0-9]+\&inboxItemID\=[0-9]+)["\']/', $line, $matches);
preg_match_all("/<table>[\s\w\/<>=\\\"]*<\/table>/m", $page, $table_matches);
echo '<strong>ID, etc...</strong><pre>'; print_r($matches); echo '</pre> <strong>Tables...</strong><pre>'; print_r($table_matches); echo '</pre>';
?>