From ff648fb80a91d22f26a49d981e90068b2b47adcb Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Sun, 19 Jan 2014 22:41:29 +0000 Subject: [PATCH] 1. Dodanie podstawowej obsługi kanałów formacie Atom (m.in. Onet.pl). 2. Opisanie sposobu rejestracji w serwicie GeoNames (skrypt pogody). --- data/tv/pobierz.php | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/data/tv/pobierz.php b/data/tv/pobierz.php index 9706a9d..f8259d3 100644 --- a/data/tv/pobierz.php +++ b/data/tv/pobierz.php @@ -37,8 +37,8 @@ 436 => 'FilmBox', 433 => 'FilmBox Extra', 174 => 'AXN', - 418 => 'AXN Crime', - 416 => 'AXN Sci-fi', + 538 => 'AXN Black', + 539 => 'AXN White', 85 => 'Ale Kino!', 205 => 'Kino Polska', 403 => 'TCM', @@ -59,6 +59,8 @@ 361 => 'Cartoon Network', ); $NUMOF = count($stations); + +ini_set('mbstring.substitute_character', 'none'); $c = curl_init(); $out = fopen('./xmltv-pre.xml', 'w'); @@ -85,11 +87,12 @@ return; } + $data = mb_convert_encoding($data, 'UTF-8', 'UTF-8'); file_put_contents('./cache/'.$num.'_'.$date, $data); unset($data); } - $doc = new DOMDocument; + $doc = new DOMDocument('1.0', 'utf-8'); @$doc->loadHTMLFile('./cache/'.$num.'_'.$date); $wp = new wp_parse($doc); @@ -114,4 +117,4 @@ } } echo OK; -?> +?> \ No newline at end of file -- Gitblit v1.9.1