From e7a6ffcc80b02198565cd51026d2b5067aafe405 Mon Sep 17 00:00:00 2001 From: wonipapa Date: Wed, 11 Oct 2017 13:39:21 +0900 Subject: [PATCH] update 1.2.3p2 --- Channel.json | 2 +- README.md | 1 + epg2xml-web.php | 9 ++++----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Channel.json b/Channel.json index 5517e51..f536a18 100644 --- a/Channel.json +++ b/Channel.json @@ -71,7 +71,7 @@ { "Id": 86, "Name": "GTV", "KT Name": "GTV", "KTCh": 73, "LG Name": "GTV", "LGCh": 136, "SK Name": "Gtv", "SKCh": 217, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/1qXSXRa.png", "Source": "HCN", "ServiceId": "35" }, { "Id": 87, "Name": "히어로액션", "KT Name": "히어로액션", "KTCh": 112, "LG Name": "히어로액션", "LGCh": 110, "SK Name": "히어로액션", "SKCh": 107, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/yBChQVh.png", "Source": "NAVER", "ServiceId": "814760" }, { "Id": 89, "Name": "하이라이트TV", "KT Name": "하이라이트TV", "KTCh": 74, "LG Name": "하이라이트TV", "LGCh": 91, "SK Name": "Highlight TV", "SKCh": 42, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/V9CQ4A6.png", "Source": "LG", "ServiceId": "701" }, -{ "Id": 90, "Name": "History HD", "KT Name": "History", "KTCh": 169, "LG Name": "히스토리 HD", "LGCh": 132, "SK Name": "History", "SKCh": 264, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/SSkop4X.png", "Source": "NAVER", "ServiceId": "815148" }, +{ "Id": 90, "Name": "History", "KT Name": "History", "KTCh": 169, "LG Name": "히스토리", "LGCh": 132, "SK Name": "History", "SKCh": 264, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/SSkop4X.png", "Source": "LG", "ServiceId": "664" }, { "Id": 91, "Name": "HQ+", "KT Name": "HQ+", "KTCh": 253, "LG Name": "", "LGCh": null, "SK Name": "HQ+", "SKCh": 47, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/GTANuZS.png", "Source": "NAVER", "ServiceId": "3566359" }, { "Id": 92, "Name": "아이넷TV", "KT Name": "아이넷TV", "KTCh": 92, "LG Name": "아이넷TV", "LGCh": 106, "SK Name": "아이넷 TV", "SKCh": 233, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/JYQpemw.png", "Source": "SKB", "ServiceId": "261" }, { "Id": 93, "Name": "IB SPORTS", "KT Name": "IB SPORTS", "KTCh": 53, "LG Name": "IB스포츠", "LGCh": 62, "SK Name": "IB Sports", "SKCh": 129, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/wOOQEC1.png", "Source": "SKY", "ServiceId": "515" }, diff --git a/README.md b/README.md index 99dd675..e052b7a 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,7 @@ https://github.com/wonipapa/epg2xml/wiki/FAQ - 가져오는 날짜 최대 7일로 변경 - KT 함수 수정 - PHP 버전 socket 사용시 화면에 출력되는 문제 해결 + - PHP 버전 한글 깨지는 문제 수정 ### Version 1.2.2 - My Channel 추가 - 소스 추가 diff --git a/epg2xml-web.php b/epg2xml-web.php index a7d183e..1adea32 100644 --- a/epg2xml-web.php +++ b/epg2xml-web.php @@ -4,7 +4,7 @@ error_reporting(E_ALL ^ E_NOTICE); @set_time_limit(0); -define("VERSION", "1.2.3p1"); +define("VERSION", "1.2.3p2"); $debug = False; $ua = "'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36'"; $timeout = 5; @@ -551,7 +551,7 @@ function GetEPGFromKT($ChannelInfo) { $response = mb_convert_encoding($response, "HTML-ENTITIES", "EUC-KR"); $dom = new DomDocument; libxml_use_internal_errors(True); - if($dom->loadHTML($response)): + if($dom->loadHTML(''.$response)): $xpath = new DomXPath($dom); $query = "//tbody/tr"; $rows = $xpath->query($query); @@ -611,12 +611,11 @@ function GetEPGFromLG($ChannelInfo) { if ($response === False && $GLOBALS['debug']) : printError($ChannelName.HTTP_ERROR); else : - $response = ''.$response; $response = mb_convert_encoding($response, "UTF-8", "EUC-KR"); $response = str_replace(array('<재>', ' [..', ' (..'), array('<재>', '', ''), $response); $dom = new DomDocument; libxml_use_internal_errors(True); - if($dom->loadHTML($response)): + if($dom->loadHTML(''.$response)): $xpath = new DomXPath($dom); $query = "//div[@class='tblType list']/table/tbody/tr"; $rows = $xpath->query($query); @@ -759,7 +758,7 @@ function GetEPGFromSKB($ChannelInfo) { $response = preg_replace_callback($pattern, function($matches) { return ''.htmlspecialchars($matches[1], ENT_NOQUOTES).'';}, $response); $dom = new DomDocument; libxml_use_internal_errors(True); - if($dom->loadHTML($response)): + if($dom->loadHTML(''.$response)): $xpath = new DomXPath($dom); $query = "//span[@class='caption' or @class='explan' or @class='fullHD' or @class='UHD' or @class='nowon']"; $spans = $xpath->query($query);