ICC World T20 Fixtures



[insert_php]
$themeURI = get_template_directory_uri ();
session_start();
$timezone = $_SESSION[‘time’];
[/insert_php]

[insert_php]
echo $themeURI.’/crcicketconcern/simple_html_dom.php’;
file_get_contents($themeURI.’/crcicketconcern/simple_html_dom.php’); //for parsing html page
include($themeURI.’/crcicketconcern/ics-parser-master/class.iCalReader.php’); //for reading fixtures from calander
//no need to scrap the website, we get json content
//we will construct a bootstrap table to display fixtures
// this is for reading fixtues
[/insert_php]

[insert_php]
$ical = new ical(‘download.ics’);$calArray = $ical->{‘cal’};
$count = 0;
foreach ($calArray as $key => $requiredValue) {if($count==1){
foreach ($requiredValue as $key => $value) {
$a = explode(” “,$value[‘SUMMARY’]);
$length = sizeof($a);
if($length>3){
$countryA = $a[0];
$countryB = $a[3];
}
else{
$countryA = $a[0];
$countryB = $a[2];
}

$year = substr($value[‘DTSTART’],0,4);
$month = date(‘F’,substr($value[‘DTSTART’],4,2));
$day = substr($value[‘DTSTART’],6,2);
$_timeH = substr($value[‘DTSTART’],9,2);
$_timeM = substr($value[‘DTSTART’],11,2);
$_time = $_timeH.’:’;
$_time.=$_timeM;
date_default_timezone_set(‘Asia/kolkata’);
// $_time = intval($_timeH)+ .’:’.$_timeM;

// echo date(“Y-m-d h:i:sa”, $value[‘DTSTAMP’]);
$dispalyVal=’

‘.$day.’ ‘.$month.’ ‘.$year.’

 

‘.$value[‘DESCRIPTION’].’ Group 1

‘.$_timeH.’:’.$_timeM.’ (‘.$timezone.’)

HTML5 Icon
v

HTML5 Icon

‘.$value[‘SUMMARY’].’

‘.$value[‘LOCATION’].’

‘;
echo $dispalyVal;
}
break;
}
else{$count++;continue;}
$count++;
}
[/insert_php]

[insert_php]

//

// include(‘simple_html_dom.php’); //for parsing html page
// include(‘./ics-parser-master/class.iCalReader.php’); //for reading fixtures from calander
// //no need to scrap the website, we get json content
// //we will construct a bootstrap table to display fixtures
// // this is for reading fixtues
// $ical = new ical(‘download.ics’);
// foreach ($ical as $key => $value) {
// // var_dump($value);
//
// # code…
// }

// fixtures display ends

//http://cdn.pulselive.com/dynamic/data/core/cricket/2012/worldt20-2016/groupStandings.js //to get dynamic content for group details pointtbale
//http://cdn.pulselive.com/dynamic/data/core/cricket/2012/worldt20-2016/matchSchedule2.js //to get details about the matches
//http://cdn.pulselive.com/dynamic/data/core/cricket/2012/worldt20-2016/groupStandings.js
// http://cdn.pulselive.com/dynamic/data/core/cricket/2012/women-worldt20-2016/matchSchedule2.js // for women

// this is for reading fixtues
//$ical = new ical(‘download.ics’);
//print_r($ical->events());
//fixtures display ends

[/insert_php]