Member Avatar for 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

Recommended Answers

All 2 Replies

Can you explain?

How is it not working?

Are you getting an error?

Is anything showing in your log files?

Member Avatar for nova37

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.