Member Avatar

nova37

hello
i have little roblem with my php code to me its seems to be ok but its not working

function bing_backs($url){      // to get backilinks
    $url = "http://www.bing.com/search?q=link%3A$url";
    $total = file_get_contents($url);
    $match_expression = '/<span class="sb_count" id="count">(.*?)<\\/span><\/div>/im'; 
   // preg_match($match_expression,$total,$matches); 
    preg_match_all($match_expression, $total, $matches);
    echo $n_clean=$matches[1];  
    return $n_clean=clean_me($n_clean); 
} 
function clean_me($numb){    // to clean the reutrn numbers remove coma (,) etc
return $clean_num=str_replace(",", "", $numb);
}



$url="www.youtube.com";
echo bing_backs($url);   // not working regex seems to be ok to me

Can you explain?

How is it not working?

Are you getting an error?

Is anything showing in your log files?

Member Avatar

nova37

it simply print word array ..... i test regex expression its correct so it shuld return digits but it cant return