For what its worth, I did the same thing awhile ago, and since the page I was grabbing was always the same (except for the data I needed) and the coder was kind enough to put a <! --- code starts here --- >
comment right where i wanted to start as well as an ending comment, I just read the file in and began my thing when i hit the comment:
$data = file(http://....);
while(list(,$line) = @each($data)) {
if ($line == "<! --- code starts here --- >") {
// begin doing my thing
} elseif ($line == "<! --- code ends here --- >") {
// stop doing my thing
}
}