<?php
$title="Live Cricket Score | Cricket Fixtures | Cricket Results | Cricket News
| ODI | Test | 20- 21";



include "header.php";


?>


<style>
.button{
    margin: 3px;
}

</style>





<?php



$dom = new domDocument;
@$dom->loadHTML(url_contents('http://www.cricwaves.com/mobile/'));
$dom->preserveWhiteSpace = false;


$html = '';
$domxpath = new DOMXPath($dom);
$newDom = new DOMDocument;
$newDom->formatOutput = true;

$sections = $domxpath->query('//div[@class="clr list_content" or @class="clr list_content "][./div[contains(.,\'Matches\')]]');

$i = 0;
while( $myItem = $sections->item($i++) ){
    $node = $newDom->importNode( $myItem, true );    // import node
    $newDom->appendChild($node);                    // append node
}
$html = $newDom->saveHTML();

$html=str_ireplace("http://www.cricwaves.com/cricket/widgets/","frame.php?sec=",$html);
$html=str_ireplace("http://www.cricwaves.com","",$html);
$html=str_ireplace("mobile/loadMatch?mid=","$base_url"."match.php?id=",$html);
$html=str_ireplace("mobile/loadScore?mid=","$base_url"."score.php?id=",$html);
$html=str_ireplace("mobile/loadCom?mid=","$base_url"."commentry.php?id=",$html);
$html=str_ireplace("mobile/loadTPlD","$base_url"."player.php",$html);

$html=str_ireplace("clr list_content","block",$html);
$html=str_ireplace("margin:0px;","",$html);
$html=str_ireplace("morebtn-txt","button",$html);
$html=str_ireplace("Ltab","block-head",$html);
$html=str_ireplace("<div class=\"Match_result\">","<br><br><div style=\"padding: 3px\" class=\"Match_result\">",$html);
$html=str_ireplace("width:98%;padding:4px 1%;","",$html);

$html=str_ireplace("mobile/cricket-results","$base_url"."results.php",$html);
$html=str_ireplace("mobile/cricket-schedule","$base_url"."schedule.php",$html);

//$html = preg_replace('#<iframe(.*?)>(.*?)</iframe>#is', '', $html);
$a = $html;

if (strpos($a, 'Live Matches') !== false) {}else{



?>





<div class="block" style="margin-bottom:0px;">
<div class="clr Tabs"><div rev="async" class="block-head">Live Matches</div></div>
<div class="clr"><div class="list_content_in" style="">

<br><br><div style="padding: 3px; color:red;" class="Match_result"><b><i>There are no live matches available Now</i></b></div>
</div></div>
</div>






<?php 
  
}

echo $html;



include "footer.php";
?>

