Hello,
i'm looing for a free script that will allow me to retrieve the show times located at this page: http://schedule.adultswim.com/servlet/S ... &filter=as
I've searched all over the web and have not found a script that works. Thanks
content retrieval script
Moderator: General Moderators
you should learn how to use regex..
every page is different, and will require the regex pattern to be tailored to work correctly. there is no one does all script for this.
but ill give you a nudge in the right direction
your going to need a much more complicated regex pattern for it to work properly, which, i cant help with.
every page is different, and will require the regex pattern to be tailored to work correctly. there is no one does all script for this.
but ill give you a nudge in the right direction
Code: Select all
<?php
$html = file_get_contents('http://website.com');
$pattern = '/<td>(.*)<\/td>/i';
preg_match_all($pattern, $html, $matches);
echo '<pre>';
print_r($matches);
?>- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Well put, you are going to need to know exackly how the tables are formatted, and then come up with a regular expression for each website you are retrieving the data from. You are then going to need to set up something like a chron job to update the site every 15 minutes or so for new listings.
helpful links: [php_man]regex[/php_man], [php_man]preg_match[/php_man]
helpful links: [php_man]regex[/php_man], [php_man]preg_match[/php_man]