i need help with table of another site. I need get table value from http://sfl.lt/lenteles/3-omnitel_cup/ site, not first table value but second: "SFL Omnitel taurė B grupė". How this do?
- Code: Select all
<?php
$xx = "http://sfl.lt/lenteles/3-omnitel_cup/";
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, $xx);
curl_setopt($cURL, CURLOPT_HEADER,0);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($cURL, CURLOPT_COOKIESESSION, true);
curl_setopt($cURL, CURLOPT_FOLLOWLOCATION, 1);
$strPage = curl_exec($cURL);
curl_close($cURL);
$strPage = str_replace('dryzuotas', 'spalvotas', $strPage);
$strPage = str_replace('href="/komanda', 'href="http://sfl.lt/komanda', $strPage);
$strPage = str_replace(' odd', 'even', $strPage);
$strPage = str_replace(' even', 'odd', $strPage);
$pattern = "/<(a.*?href=\"[^#])([^>]+)>/";
$replacement = '<\\1\\2 target="_blank">';
$strPage = preg_replace($pattern,$replacement,str_replace('target="_blank"','',$strPage));
$pattern = '#<table class="inner_table">(.+)</table>#Us';
if( preg_match($pattern, $strPage, $match) ){
$catch = $match[1];
echo '<table id="wp-calendar">';
echo '<caption>SFL Omnitel taurė B grupė</caption>';
echo $catch;
echo '</table>';
}else{
echo 'Could not find it';
}
?>
And second question: how to show only "Vieta" "Komanda" "Varžybos" "Skirtumas" "Taškai" columns value from received table? thank you

