Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   FreeTSP (http://www.bvlist.com/forumdisplay.php?f=120)
-   -   Tv Guide as requested by hatijahat (http://www.bvlist.com/showthread.php?t=10032)

firefly007 10th September 2014 08:56

Tv Guide (malaysiantvonline.com) as requested by hatijahat
 
1 Attachment(s)
Not sure what source this is for but its simple to mod it according..

Create a file called "guide.php"


Code:


include_once('simple_html_dom.php');

$day = $_GET["day"];

if ($day == "mon"){
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/monday.htm';
}elseif ($day == "tue"){
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/tuesday.htm';
}elseif ($day == "wed"){ 
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/wednesday.htm';
}elseif ($day == "thu"){   
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/thursday.htm';
}elseif ($day == "fri"){ 
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/friday.htm';
}elseif ($day == "sat"){   
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/saturday.htm';
}elseif ($day == "sun"){ 
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/sunday.htm';
   
}

$fp = fopen("guide_cache.php", "w");
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $OUT);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");
curl_exec($ch);


$html = file_get_html("guide_cache.php");
    foreach($html->find('#weekly-listing') as $e)
    $main = $e->innertext . '';
    print '
   
 
   
   
   
   
   
   
   
 

    ';
    print $main;

?>

Then save the attachment (simple_html_dom.php) to www folder.

hatijahat 10th September 2014 12:08

Quote:

Originally Posted by firefly007 (Post 45127)
Not sure what source this is for but its simple to mod it according..

Create a file called "guide.php"


Code:


include_once('simple_html_dom.php');

$day = $_GET["day"];

if ($day == "mon"){
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/monday.htm';
}elseif ($day == "tue"){
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/tuesday.htm';
}elseif ($day == "wed"){ 
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/wednesday.htm';
}elseif ($day == "thu"){   
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/thursday.htm';
}elseif ($day == "fri"){ 
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/friday.htm';
}elseif ($day == "sat"){   
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/saturday.htm';
}elseif ($day == "sun"){ 
    $OUT = 'http://malaysiantvonline.com/RegularTV/Daily/sunday.htm';
   
}

$fp = fopen("guide_cache.php", "w");
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $OUT);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");
curl_exec($ch);


$html = file_get_html("guide_cache.php");
    foreach($html->find('#weekly-listing') as $e)
    $main = $e->innertext . '';
    print '
   
 
   
   
   
   
   
   
   
 

    ';
    print $main;

?>

Then save the attachment (simple_html_dom.php) to www folder.

superb and millions thanks.. i will try this on my tracker.. :ok:


All times are GMT +2. The time now is 01:51.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.