
<?php
$txt = file_get_contents($url);
$arr = get_tag($txt, "body");
print_r($arr);
function get_tag($txt,$tag){
$offset = 0;
$start_tag = "<".$tag;
$end_tag = "</".$tag.">";
$arr = array();
do{
$pos = strpos($txt,$start_tag,$offset);
if($pos){
$str_pos = strpos($txt,">",$pos)+1;
$end_pos = strpos($txt,$end_tag,$str_pos);
$len = $end_pos - $str_pos;
$f_text = substr($txt,$str_pos,$len);
$arr[] = $f_text;
$offset = $end_pos;
}
}while($pos);
return $arr;
}
?> 
Users browsing this forum: No registered users and 2 guests