Пример #1
0
function olymp_get_bets(&$tournir_node, $sport_sign, $tournir_id, $debug = null)
{
    $booker = 'olymp';
    $host = 'https://www.olympbet.com';
    if (file_exists('proxy.txt')) {
        $proxy = file_get_contents('proxy.txt');
    }
    $league_path = "lines/{$booker}/{$sport_sign}.";
    $file_name = $league_path . "{$tournir_id}.html";
    $url = "{$host}/engine.php?act=co&co={$tournir_id}";
    $html = download_or_load($debug, $file_name, $url, "GET", $proxy, "{$host}/{$sport_sign}-odds.html");
    extract_bets($tournir_node, $html, $sport_sign, $tournir_id);
    if ($debug) {
        file_put_contents($league_path . "{$tournir_id}.xml", $tournir_node->asXML());
    }
}
Пример #2
0
function bwin_get_bets(&$tournir_node, $sport_sign, $tournir_id, $categories, $debug = null)
{
    $booker = 'bwin';
    $host = 'https://www.bwin.com';
    if (file_exists('proxy.txt')) {
        $proxy = file_get_contents('proxy.txt');
    }
    $league_path = "lines/{$booker}/{$sport_sign}.";
    foreach ($categories as $category_id) {
        $current_page = 0;
        do {
            $current_page++;
            $file_name = $league_path . "{$tournir_id}.{$category_id}.{$current_page}.html";
            $url = "{$host}/betviewiframe.aspx?sorting=leaguedate&categoryIDs={$category_id}&bv=bb&leagueIDs={$tournir_id}";
            $html = download_or_load($debug, $file_name, $url, "GET", $proxy, "{$host}/{$sport_sign}?ShowDays=168");
            extract_bets($tournir_node, $html, $sport_sign, $tournir_id, $category_id);
        } while (to_be_continue($html, $current_page + 1));
    }
    if ($debug) {
        file_put_contents($league_path . "{$tournir_id}.xml", $tournir_node->asXML());
    }
}