I'm currently in need of a way to grab certain elements from a different site, and replace the contents of them with my own content using PHP.
If a website has a page that contains the following table and div
<div>Div Contents!</div>
<table>
<tr>
<td>Table Column 1</td>
<td>Table Column 2</td>
</tr>
</table>
I need to be able to grab this information, and replace "Div Contents!", "Table Column 1", and "Table Column 2" with my own data.
What would be the best way to do this? Regular expressions or strpos/str_replace/substr etc.
I appreciate any help and examples you provide.