<?php
$title="Player Info | Live Cricket Score | Live Score on Mobile | Free Cricket Scores | ODI | TEST | IPL Scores | Live Score Card | Free Score Updates | CricSkore.com";

include "header.php";



$dom = new domDocument;
@$dom->loadHTML(url_contents('http://www.cricwaves.com/mobile/loadTPlD?tid='.$_GET['tid'].'&pid='.$_GET['pid']));
$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("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("background-color:#333333;","",$html);
$html=str_ireplace("height:60px; background:#FFF;","",$html);
$html=str_ireplace('width:50%;" id="tab_ings','width:auto;" id="tab_ings',$html);
$html=str_ireplace("2')\" class=\"fl","2')\" class=\"fr",$html);
$html=str_ireplace("font-size:1.5em;","",$html);
$html=str_ireplace("morebtn-txt","button",$html);
//$html=str_ireplace("fl L_score Inngs_Tab","L_score Inngs_Tab",$html);
$html=str_ireplace('<div class="Back fl"><a href="javascript:%20history.go(-1)"><img style="display:none;visibility:hidden;" data-cfsrc="/cricket/mobile/static/images/Back.gif" title="Go to Previous Page" alt="Back"><noscript><img src="/cricket/mobile/static/images/Back.gif" title="Go to Previous Page" alt="Back"></noscript></a></div>',"",$html);
$html=str_ireplace("<noscript>","",$html);
$html=str_ireplace("</noscript>","",$html);
$html=str_ireplace("/cricket/pics/c140x160/","playerpic.php?file=",$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;
?>
<div class="block">
<a href="index.php">Home</a>&nbsp;&raquo;&nbsp;Player Info
</div>
<?php
include "footer.php";
?>