I'm trying to use file_get_contents to grab the contents of a page and then echo only characters between two parts of the code.
Right now I'm using this:
$text = file_get_contents("http://www.example.com/whatever.html");
preg_match('/<!-- start -->(.*)<!-- end -->/s', $text, $matches);
$code = $matches;
However now I want to do it to a page that doesn't have markers such as <!-- start -->, it only has straight html code.
I need someone to echo the contents between two parts of code such as <form> and </form>
If someone can work out how to do this for me I'll give you $50.
BTW, I need this done asap!