i have written a code for file reading in php ... here is my code
<?php
include ('GphpChart.class.php');
echo "<META HTTP-EQUIV=Refresh CONTENT='2; URL=graph.php'>";
$l=fopen('new.txt',"r");
$lines = fgets($l);
$s=explode(',',$lines);
$arrval=$s;
$lc1 = $arrval;
$GphpChart = new GphpChart("lc");
$GphpChart->title = "My chart";
$GphpChart->add_data($lc1);
echo $GphpChart->get_Image_String();
echo "</META>";
?>
it reads data from the text file and displays graph from it .
what i am unable to sort out is i want to read 30 characters at one time from the file then displays graph of those 30 characters and when the page refreshes it reads the next 30 characters and then displays the graph of these 60 characters and so on. please help !