Can someone tell me how to extract a portion of HTML codes from an existing web page? I tried to extract a table from a downloaded web page but cant get no luck:
You can either professionally use a regular expression, or an old fashion strpos(), substr() combination. It's called grabbing.
<? preg_match('~<div id="post_message_3018874">(.*?[^<])<br />~i', file_get_contents('http://forums.digitalpoint.com/showthread.php?t=319634'), $yourpost ); echo $yourpost[1]; PHP: Be more specific .......