я вопше правильно вывод делаю
test1.php fayl (+/-)
define('_IN_JOHNCMS', 1);
$headmod = 'myscore';
require_once '../incfiles/core.php';
$textl = 'Футбол онлайн';
require_once '../incfiles/head.php';
function query($url)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, 'Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.2.15 Version/10.10');
curl_setopt($curl, CURLOPT_AUTOREFERER, false);
curl_setopt($curl, CURLOPT_REFERER, $_SERVER["HTTP_HOST"]);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: text/html, application/xml, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;', 'Accept-Language: ru, en, *;', 'Accept-Charset: iso-8859-1, utf-8, utf-16, *;', 'Accept-Encoding: identity;', 'Connection: close'));
curl_setopt($curl, CURLOPT_TIMEOUT, 100);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
return $result;
}
if (!$_GET['id']) header("Location: index.php");
$html = query('http://sayt.uz/oz/m/event?id='. $_GET['id'] .'&type=spycosy');
$source = preg_match_all('|<div class="content">(.*?)<div>|si',$html,$sources);
$rezultat = array();
$title = preg_match_all('|<div class="stage-name">(.*?)<\/div>|si',$sources[0][$i],$titles);
$match = preg_match_all('|<td class="home-team team">(.*?)<p class="team-title">(.*?)<\/p><\/td>|si',$sources[0][$i],$matches);
$match2 = preg_match_all('|<div class="score">(.*?)<span>(.*?)</span><strong>(.*?)</strong><\/div>|si',$sources[0][$i],$matches2);
$rezultat[$i]['title'] = $titles[0];
$rezultat[$i]['matches'] = $matches[0];
$rezultat[$i]['matches2'] = $matches2[0];
echo '' . $rezultat[$i]['matches2'][$j] . '
' . $rezultat[$i]['matches'][$j] . '
</tr>';
echo'</tbody></table></div>';
require_once '../incfiles/end.php';