i change it into following but values is in html tags
PHP Code:
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
function get_title($url)
{
$title = '';
$handle = @fopen("$url", "r");
if ($handle) {
while (!feof($handle)) {
$buffer = fread($handle, 8192);
$buffer = preg_replace("/\n|\r/", "", $buffer);
if (preg_match("#<li><strong><u>([^(</u>)]*)</u>#ui", $buffer, $matches)) {
foreach ($matches as $a=>$b){
echo $b."<br/>";
break;
}
}
}
fclose($handle);
}
return $title;
}
echo get_title("http://natural-fertility-info.com/fertility-herbs");
source code is like following
Code:
<li><strong><u>Black Cohosh</u><br/><li><strong><u>Maca</u><br/><li><strong><u>Shatavari</u><br/><li><strong><u>Yarrow</u><br/><li><strong><u>Evening Primrose Oil</u><br/><li><strong><u>Shatavari</u><br/><li><strong><u>Ashwagandha</u><br/><li><strong><u>Castor Oil</u><br/><li><strong><u>Echinacea</u><br/><li><strong><u>Goldenseal</u><br/><li><strong><u>Red Raspberry</u><br/>
how can i print just value ??
Bookmarks