Sure thing! You "just" need to do some work first. Have a look at these string-commands :
strpos - looks for a string in a string (like </form> in your page)
substr - copies a part of a string from a string (like everything after </form> to the end of your page)
strlen - gives you the length of a string (like how much you should copy from </form> and to the end of your page)
Hint : Have a look at this URL
http://www.php.net/manual/en/ref.strings.php