View Single Post
  #1  
Old 10th September 2014, 08:56
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default Tv Guide (malaysiantvonline.com) as requested by hatijahat
Not sure what source this is for but its simple to mod it according..

Create a file called "guide.php"


Code:
<?php

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 . '<br>';
    print '
    <table width="100%">
  <tr>
    <td><div align="center"><a href="/guide.php?day=mon">Monday</a></div></td>
    <td><div align="center"><a href="/guide.php?day=tue">Tuesday</a></div></td>
    <td><div align="center"><a href="/guide.php?day=wed">Wednesday</a></div></td>
    <td><div align="center"><a href="/guide.php?day=wed">Thursday</a></div></td>
    <td><div align="center"><a href="/guide.php?day=fri">Friday</a></div></td>
    <td><div align="center"><a href="/guide.php?day=sat">Saturday</a></div></td>
    <td><div align="center"><a href="/guide.php?day=sun">Sunday</a></div></td>
  </tr>
</table>
    ';
    print $main;

?>
Then save the attachment (simple_html_dom.php) to www folder.
Attached Files
File Type: php simple_html_dom.php (61.8 KB, 37 views)
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me

Reply With Quote
The Following User Says Thank You to firefly007 For This Useful Post:
hatijahat (10th September 2014)