<?php
$title="Live Cricket Score | Cricket Fixtures | Cricket Results | Cricket News
| ODI | Test | 20- 20 | Cricket News | Inda | Pakistan | bangaldesh  |
Sri lanka | australia | National Elite League Twenty20 | East Africa
Premier League | Metropolitan Bank Twenty20 | Stanbic Bank 20 Series |
Standard Bank Pro 20 Series | MiWay T20 Challenge | Ram Slam T20
Challenge | Scotiabank National T20 Championship | Upcoming league |
Stanford 20/20 | Stanford Super Series | Caribbean Twenty20 |
Caribbean Premier League | Bangladesh Premier League | Inter-State T20
Championship | Indian Premier Leagu | Syed Mushtaq Ali Trophy |
ABN-AMRO Twenty-20 Cup | RBS Twenty-20 Cup | Faysal Bank Twenty-20 Cup
| Faysal Bank Super 8 T20 Cup | Ramadan T20 Cup | Faysal Bank T-20 Cup
for Departments | Twenty20 Tournament | Inter-Provincial Twenty20 |
Sri Lanka Premier League | Twenty20 Cup | Friends Life t20 | Insinger
de Beaufort Twenty20 Cup | Murgitroyd Twenty20 | KFC Twenty20 Big Bash
| Big Bash League | State Twenty20 | HRV Cup | International 20:20
Club Championship | Champions League Twenty20";

include "header.php";


$dom = new domDocument;
@$dom->loadHTML(url_contents('http://www.cricwaves.com/mobile/cricket-schedule'));
$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 "]');

$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("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("clr Tabs","clr block-head",$html);
$html=str_ireplace("Match_name","Match_data",$html);

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

echo $html;

include "footer.php";
?>