有没有人知道任何(最好免费)支持api用于通过邮政编码访问电影放映时间?
我不相信任何现有的api,例如netflix或imdb,都提供此信息.
当"allow_url_fopen"被禁用时,请使用
today|1 day|2 days|etc.. * &start=10 gets the second page etc... * * Please download the latest version of simple_html_dom.php on sourceForge: * http://sourceforge.net/projects/simplehtmldom/files/ * * @author Bas van Dorst* @version 0.1 * @package GoogleShowtime * * @modifyed by stephen byrne * @GoldMinelabs.com */ require_once('simple_html_dom.php'); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'http://www.google.ie/movies?near=dublin'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); $str = curl_exec($curl); curl_close($curl); $html = str_get_html($str); print ' '; foreach($html->find('#movie_results .theater') as $div) { // print theater and address info print "Theate: ".$div->find('h2 a',0)->innertext."\n"; //print "Address: ". $div->find('.info',0)->innertext."\n"; // print all the movies with showtimes foreach($div->find('.movie') as $movie) { print "Movie: ".$movie->find('.name a',0)->innertext.'
'; print "Time: ".$movie->find('.times',0)->innertext.'
'; } print "\n\n"; } // clean up memory $html->clear(); ?>
2> broox..:是的,雅虎显然在2009年11月删除了他们的秘密电影API.
似乎每个人都从TMS Data Direct获取他们的数据:http://www.tmsdatadirect.com/
3> toad..:不知道谷歌是否将它暴露为api,但这看起来很像你想要的. http://www.google.com/movies?hl=en&near=90210&dq=movie+times+90210&sa=X&oi=showtimes&ct=title&cd=1