[Solved] Read within a certain area of a file
Posted: Mon Apr 18, 2011 7:41 am
Hi i have a code to read from a file, that file is a html file.
But i would only like to read within the body tags, how do i do that?
If someone could give me an example i could work from, that would be awsome.
Thanks
But i would only like to read within the body tags, how do i do that?
If someone could give me an example i could work from, that would be awsome.
Thanks
Code: Select all
<?php
include 'index.php';
$file = "$_GET['item']";
$fp = fopen($file, "r");
while(!feof($fp)) {
?$data = fgets($fp, 1024);
echo "$data <br>";
}
fclose($fp);
?>