read remote tag in remote content
i can read remote tag but just one like following
PHP Code:
function get_title($url)
{
$title = '';
$handle = @fopen("$url", "r");
if ($handle) {
$i=0;
while (!feof($handle)) {
$i++;
$buffer = fread($handle, 8192);
$buffer = preg_replace("/\n|\r/", "", $buffer);
if (preg_match('/<li>(.*?)<\/u>/i', $buffer, $matches)) {
$title = $matches[$i];
break;
}
}
fclose($handle);
}
return $title;
}
echo get_title("http://natural-fertility-info.com/fertility-herbs");
but how can i read all data which is between <li><strong><u> and </u> in remote content