Tabela Ekstraklasy 2017/18

<?php
                    $css = ‚
                    <style type=”text/css”>
                    .table-ranking {width:100%;border-collapse:collapse;margin-bottom:20px;}
                    .table-ranking .team-name ~ td, .table-ranking th { text-align:center; }
                    .table-ranking tbody tr:nth-of-type(odd) { background: rgba(0,0,0,.05); }
                    .table-ranking tr td:first-child, .table-ranking tr th:first-child, .table-ranking .team-logo { display:none; }
                    </style>
                    ‚;

ob_start(); 
$out = fopen(‚php://output’, ‚w’);
var_dump(file_get_contents(‚https://www.laczynaspilka.pl/rozgrywki-tabela/futsal-ekstraklasa,5007.html’));
                    $url = ‚https://www.laczynaspilka.pl/rozgrywki-tabela/futsal-ekstraklasa,5007.html’;
                    $ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, true); 
curl_setopt($ch, CURLOPT_STDERR, $out);
                    curl_setopt($ch, CURLOPT_URL, $url);
                    curl_setopt($ch, CURLOPT_FAILONERROR, true);
                    //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
                    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                    curl_setopt($ch, CURLOPT_USERAGENT, ‚Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)’);
                    $content = curl_exec($ch);
fclose($out);
var_dump($out, $ch, $content);

                    curl_close($ch);

                    $start_code = ‚<table class=”table-template table-ranking”>’;
                    $end_code = ‚</table>’;

                    $temp = explode($start_code, $content);
                    $new_code = $start_code.$temp[1];

                    $temp = explode($end_code, $new_code);
                    $new_code = $temp[0].$end_code;

                    $new_code = preg_replace(„/data-url=\”(\S+)\”/”, ”, $new_code);

                    $new_code = preg_replace(‚#<img([^>]*) src=”([^”/]*/?[^”.]*\.[^”]*)”([^>]*)>((?!</a>))#’, ”, $new_code);

                    echo $css.$new_code;

?>

Zacznij Rozmowę

Twój adres e-mail nie zostanie opublikowany. Wymagane pola są oznaczone *