Пример #1
0
} else {
    $Html = download("{$Host}/{$FormAction}", "POST", "{$Host}/bets.php?line_id[]={$Sport}", $PostHash);
}
function extract_bet($Html)
{
    $Html = extract_tags($Html, '<table cellSpacing=2 cellPadding=1', '</table>', "\r\n");
    $Html = kill_space($Html);
    $Html = kill_tag_bound($Html, 'b|a|br|font|img');
    $Html = str_ireplace(' nowrap', '', $Html);
    $Html = kill_property($Html, 'onmouseover|onclick|align|id|style|width|cellspacing');
    //  Убираем строки без ставок
    $Html = delete_all($Html, '<tr>', '</tr>', 'class="t_comment"');
    $Html = delete_all($Html, '<tr>', '</tr>', 'class="t_comment1"');
    $Html = str_ireplace(' class=date', ' @lass=date', $Html);
    $Html = kill_property($Html, 'class');
    $Html = str_ireplace(' @lass=date', ' class=date', $Html);
    return $Html;
}
$Result = extract_bet(convert_to_utf8($Html));
if ($debug) {
    file_put_contents($Lines . 'bets.txt', $Result);
}
if ($debug) {
    file_put_contents($Lines . 'bets.txt.html', $Result);
}
print $Result;
?>
</body>
</html>

Пример #2
0
    $Html = kill_tag_bound($Html, 'input|itemevent|a|b');
    $Html = str_ireplace(' noshade', '', $Html);
    $Html = kill_property($Html, 'time|color');
    $Html = replace_all($Html, '<sup>', '</sup>', ' ');
    $Html = kill_tag($Html, 'big');
    $Html = str_ireplace('<endpreview/>', '', $Html);
    $Html = str_ireplace('<hr><br>', '<hr>', $Html);
    $Html = str_ireplace('<br>Оглавление<', '<', $Html);
    $Html = str_ireplace('<br>Оглавление<', '<', $Html);
    $Html = replace_all($Html, '<u>', '</form>', '</form>');
    $Html = kill_tag_bound($Html, 'u|form');
    $Html = delete_all($Html, '<span ', '</span>', 'maxcap');
    return $Html;
}
// Получаем перечень ставок
if ($debug) {
    $FileName = $Lines . "bets.html";
    if (!file_exists($FileName)) {
        $Html = download_page("http://odds.marathonbet.com/odds-view.phtml?h=0&r0=0&r0=0", "GET", '', '');
        file_put_contents($FileName, $Html);
    } else {
        $Html = file_get_contents($FileName);
    }
} else {
    $Html = download_page("http://odds.marathonbet.com/odds-view.phtml?h=0&r0=0&r0=0", "GET", '', '');
}
$Result = extract_bet($Html);
if ($debug) {
    file_put_contents($Lines . 'bets.txt', $Result);
}
print $Result;
Пример #3
0
}
// Получаем перечень ставок
$PostData = array();
$PostData['leagueIDs'] = $LeagueList;
$PostData['sorting'] = "dateleague";
$PostData['categoryIDs'] = $CategoryId;
$PostData['currentPage'] = $CurrentPage;
if ($debug) {
    $FileName = $Lines . "{$CurrentPage}.bets.html";
    if (!file_exists($FileName)) {
        $Html = download("https://www.bwin.com/betviewiframe.aspx", "GET", "https://www.bwin.com/{$Sport}?ShowDays=168", $PostData);
        file_put_contents($FileName, $Html);
    } else {
        $Html = file_get_contents($FileName);
    }
} else {
    $Html = download("https://www.bwin.com/betviewiframe.aspx", "GET", "https://www.bwin.com/{$Sport}?ShowDays=168", $PostData);
}
$Result = extract_bet(utf8_to_ansi_ru(utf8_to_ansi_ce($Html)));
if (stripos($Html, '"pagingGotoNextItem"') == 0) {
    $Result .= '"LastPage=True"';
} else {
    $Result .= '"LastPage=False"';
}
if ($debug) {
    file_put_contents($Lines . 'bets.txt.html', $Result);
}
print $Result;
?>

Пример #4
0
} else {
    $Html = file_get_contents($FileName);
}
$FileName = $Lines . "sport.txt";
file_put_contents($FileName, extract_sport($Html));
// Получаем перечень турниров
$FileName = $Lines . "league.html";
if (!file_exists($FileName)) {
    $PostData = explode("\r\n", file_get_contents($Lines . "sport.txt"));
    $Html = download_page("http://www.betcity.ru/bets.php", "POST", "http://www.betcity.ru/main2.php", implode('&', $PostData));
    file_put_contents($FileName, $Html);
} else {
    $Html = file_get_contents($FileName);
}
$FileName = $Lines . "league.txt";
file_put_contents($FileName, extract_league($Html));
// Получаем перечень ставок
$FileName = $Lines . "bets.html";
if (!file_exists($FileName)) {
    $PostData = explode("\r\n", file_get_contents($Lines . 'league.txt'));
    $Html = download_page("http://www.betcity.ru/bets2.php", "POST", "http://www.betcity.ru/bets.php", implode('&', $PostData));
    file_put_contents($FileName, $Html);
} else {
    $Html = file_get_contents($FileName);
}
$FileName = $Lines . 'bets.txt';
file_put_contents($FileName, extract_bet($Html));
print file_get_contents($FileName);
?>