Esempio n. 1
0
function extract_bet($Html)
{
    $Html = copy_be($Html, '<form ', '</form>', 'betform');
    $Html = kill_tag($Html, 'script|div');
    $Html = kill_space($Html);
    $Html = kill_tag_bound($Html, 'b|span|br|i|a|input|font|img');
    $Html = delete_all($Html, '<tr', '</tr>', 'line3');
    $Html = kill_property_value_exclude($Html, 'class', 'line_table');
    $Html = kill_property($Html, 'width|height|valign|align|bgcolor|style|border|cellspacing|cellpadding');
    //  Убираем "левые" данные
    $Html = replace_all_contain($Html, '<tr', '</tr>', '', 'Хозяева|' . 'Гости|' . 'Индив.тотал:|' . '-я четверть|' . '-я партия|' . ' тайм|' . '-й сет');
    return $Html;
}
Esempio n. 2
0
function extract_bet($Html)
{
    $Html = extract_tags($Html, '<table ', '</table>', '', 'Дома');
    $Html = kill_space($Html);
    $Html = str_ireplace('=>', '|', $Html);
    $Html = kill_comment($Html);
    $Html = kill_tag($Html, 'script');
    $Html = kill_tag_bound($Html, 'input|b|a|img|strong');
    $Html = str_ireplace('<br>', '|', $Html);
    $Html = str_ireplace('>-<', '><', $Html);
    $Html = str_ireplace(' bgcolor="#66FFFF"', ' league="#66FFFF"', $Html);
    $Html = kill_property($Html, 'bgcolor|align|valign|width|border|class');
    $Html = replace_all_contain($Html, '<tr', '</tr>', '', 'угл |' . 'ж.к ');
    return $Html;
}
Esempio n. 3
0
function extract_bet($Html)
{
    //  Разбираемся с концами строк
    $Html = str_ireplace("\n", '<br>', $Html);
    $Html = str_ireplace("\r", '<br>', $Html);
    $Html = copy_be($Html, '<form name=f1>', '</form>');
    $Html = str_ireplace('&nbsp;', ' ', $Html);
    $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;
}
Esempio n. 4
0
function extract_bet($Html)
{
    $Html = copy_be($Html, '<form name=f1', '</form>', 'Дома');
    $Html = kill_space($Html);
    $Html = kill_tag($Html, 'script');
    $Html = kill_tag_bound($Html, 'b|a|tbody|small|colgroup');
    // <!-- Выносим Экспресы и информацию о предыдущих встречах -->
    $Html = str_ireplace('<span class=tr>1</span>', '', $Html);
    $Html = delete_all($Html, '<tr>', '</tr>', '<span class=tr>');
    $Html = delete_all($Html, '<span class=n>', '</span>');
    //  <!-- Убираем строки с кнопками -->
    $Html = delete_all($Html, '<table ', '</table>', '<input ');
    //  <!-- Заменяем IMG с информацией на igif для последующего удаления -->
    $Html = replace_all($Html, '<img ', '>', "igif");
    //  <!-- Убираем левые коэффициенты в скобках -->
    $Html = replace_all($Html, '>(', ')', '>');
    //  <!-- Убираем оглавление -->
    $Html = delete_all($Html, "<div ", "</div", "Оглавление");
    $Html = kill_property($Html, 'width|border');
    $Html = replace_all_contain($Html, '<tr', '</tr>', '', '>Хозяева|' . '>Гости|' . '>Фолы|' . '>ж/к|' . '>угл.');
    return $Html;
}
Esempio n. 5
0
function extract_bet($Html)
{
    $Html = delete_all($Html, "(at ", ")");
    $Html = delete_all($Html, "(score: ", ")");
    $Html = str_ireplace('<wbr/>', '', $Html);
    $Html = str_replace("-.--", " ", $Html);
    $Html = kill_tag($Html, "h1|script");
    $Html = kill_space($Html);
    $Html = kill_comment($Html);
    $Html = numbering_tag($Html, 'div');
    $Html = extract_numbered_tags($Html, 'div', "", "bet-list");
    $Html = extract_numbered_tags($Html, 'div', "", "dsBodyContent");
    $Html = kill_property($Html, 'TagNo');
    $Html = kill_property($Html, "onmouseover|onmouseout|onclick|bgcolor|border|cellpadding|leaguename|id|width|cellspacing|regionname");
    $Html = kill_property_value($Html, "colspan", "1");
    $Html = kill_tag_bound($Html, "form|input|a|nobr|img|tbody|span");
    $Html = delete_all($Html, ' class="unselected ', '"');
    $Html = delete_all($Html, ' class=\'unselected ', '\'');
    $Html = replace_all_contain($Html, '<div', '</div>', '', 'isFavourite|' . 'isNoFavourite');
    $Html = replace_all_contain($Html, '<tr', '</tr>', '', 'sizer|' . 'bottomline');
    $Html = kill_property_value_exclude($Html, "class", "controlHeaderNoShadow|topbar|normal|def|alt|ControlContent");
    $Html = str_ireplace('<td></td>', '<td/>', $Html);
    $Html = kill_unclassed_tag($Html, 'div');
    $Html = kill_apostrof($Html, 'colspan');
    // !-- Приводим Totalы к нормальному виду -->
    $Html = replace_all($Html, "<h5>Сумма набранных очков ", '</h5>', '<h5>Total</h5>');
    $Html = replace_all($Html, "<h5>Тотал ", '</h5>', '<h5>Total</h5>');
    $Html = replace_all($Html, "<h5>Сколько будет забито голов?", '</h5>', '<h5>Total</h5>');
    $Html = replace_all($Html, "<h5>Сколько голов будет забито?", '</h5>', '<h5>Total</h5>');
    $Html = replace_all($Html, "<h5>Сколько геймов будет сыграно в матче?", '</h5>', '<h5>Total</h5>');
    $Html = replace_all($Html, "<h5>Кто выиграет больше геймов в матче? (гандикап игрока)", '</h5>', '<h5>Fora</h5>');
    $Html = replace_all($Html, "<h5>Двойной шанс", '</h5>', '<h5>1X_12_X2</h5>');
    $Html = str_ireplace('<tr class="alt"', "\r\n" . '<tr class="alt"', $Html);
    $Html = str_ireplace('<tr class="def"', "\r\n" . '<tr class="alt"', $Html);
    $Tags = explode("\r\n", $Html);
    foreach ($Tags as $tag) {
        if (copy_be($tag, '>', '<', ' - ', ' - ', ':')) {
            $Html = str_ireplace("\r\n" . $tag, str_ireplace('="alt"', '="evn"', $tag), $Html);
        }
    }
    $Tags = explode("\r\n", $Html);
    foreach ($Tags as $tag) {
        if (strpos($tag, '"alt"')) {
            $newtag = numbering_tag($tag, 'tr');
            $trAlt = extract_numbered_tags($newtag, 'tr', '', 'alt');
            $h5 = delete_all($trAlt, '<', '>');
            if (strpos($h5, ' ')) {
                $newtag = str_replace($trAlt, '', $newtag);
                $Normals = explode("\r\n", extract_numbered_tags($newtag, 'tr', "\r\n", 'normal'));
                foreach ($Normals as $normal) {
                    $newtag = str_replace($normal, '', $newtag);
                }
                $newtag = kill_property($newtag, 'TagNo');
                $Html = str_replace($tag, $newtag, $Html);
            }
        }
    }
    $Html = str_ireplace("\r\n", '', $Html);
    $Html = str_ireplace('<tr class="evn"', "\r\n" . '<tr class="evn"', $Html);
    $Tags = explode("\r\n", $Html);
    foreach ($Tags as $tag) {
        if (strpos($tag, '"evn"')) {
            $newtag = numbering_tag($tag, 'tr');
            $trEvn = extract_numbered_tags($newtag, 'tr', '', 'evn');
            if (strpos($newtag, '="normal"') == 0) {
                $newtag = str_replace($trEvn, '', $newtag);
            }
            $newtag = kill_property($newtag, 'TagNo');
            $Html = str_replace($tag, $newtag, $Html);
        }
    }
    $Html = str_ireplace("\r\n", '', $Html);
    return $Html;
}
Esempio n. 6
0
function extract_bet($Html)
{
    $Html = kill_space($Html);
    $Html = numbering_tag($Html, 'table');
    $Html = extract_numbered_tags($Html, 'table', '', 'content');
    $Tags = explode("\r\n", extract_tags($Html, '<table', 'height="22"', "\r\n"));
    foreach ($Tags as $tag) {
        $TagNo = extract_tagno($tag, 'table');
        $Table = extract_numbered_tag($Html, 'table', $TagNo);
        if (stripos($Table, 'поб.1') > 0) {
            $Result .= $Table;
        }
    }
    $Html = $Result;
    $Html = str_ireplace('>-<', '><', $Html);
    $Html = kill_comment($Html);
    $Html = kill_tag($Html, 'script');
    $Html = kill_tag_bound($Html, 'a|b|img|strong');
    $Html = kill_property($Html, 'tagno|bgcolor|align|valign|width|cellspacing|border|cellpadding');
    $Html = replace_all_contain($Html, '<tr', '</tr>', '', ' тайм)|' . ' тайм:|' . ' четверть:|' . '-й сет:|' . 'Дополнительные тоталы:|' . 'colspan="17"|' . 'Первый матч|' . 'Второй матч|' . 'Хозяева|' . 'Счет серии');
    return $Html;
}
Esempio n. 7
0
function extract_bet($Html)
{
    $Html = str_ireplace(' nowrap', ' ', $Html);
    $Html = kill_space($Html);
    $Html = kill_comment($Html);
    $Html = extract_tags($Html, '<table ', '</table>', "\r\n", 'class="OT"');
    $Html = kill_tag($Html, "script");
    $Html = kill_tag_bound($Html, "form|input|a|nobr|img|tbody|div");
    $Html = kill_property($Html, "onmouseover|onmouseout|onclick|bgcolor|border|cellpadding|cellspacing|width|id|class");
    return $Html;
}