View Single Post
  #2  
Old 10th September 2014, 12:08
hatijahat hatijahat is offline
Senior Member
 
Join Date: Dec 2012
Malaysia
Posts: 43
Default
Quote:
Originally Posted by firefly007 View Post
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.
superb and millions thanks.. i will try this on my tracker..
Reply With Quote