Tv.php
authorAlan Knowles <alan@akbkhome.com>
Sat, 29 Oct 2011 12:18:04 +0000 (20:18 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sat, 29 Oct 2011 12:18:04 +0000 (20:18 +0800)
Tv.php

diff --git a/Tv.php b/Tv.php
index 7c70ca4..af6a3c8 100644 (file)
--- a/Tv.php
+++ b/Tv.php
@@ -223,9 +223,11 @@ class XML_Tv
         
         // if it's a day row..
         
-        if (preg_match('/<div/', trim($data))) {
-            preg_match('/<BR>([0-9]{4}-[0-9]{2}-[0-9]{2})/i', $data, $matches);
-            var_dump($data);
+        $lines = explode("\n",  $data);
+        
+        if (preg_match('/<div/', trim($lines[1]))) {
+            
+            preg_match('/<BR>([0-9]{4}-[0-9]{2}-[0-9]{2})/i', $lines[1], $matches);
             return $matches[1];
             
         }