joecooper Posted August 28, 2011 Share Posted August 28, 2011 Hi, Im trying to work out a way to get the New York Lottery's Take 5 results. Theres a few sites that list the winning numbers, i assume automatically as there is alot of lottery games on these sites. what would be the best way to get this? http://www.myfreepost.com/lottery/index.php/us/newyorklottery/takefive/result/ http://www.elite-lottery-results.com/?action=view_game&gid=NY2 Link to comment https://forums.phpfreaks.com/topic/245913-screen-scraping-with-php/ Share on other sites More sharing options...
xyph Posted August 28, 2011 Share Posted August 28, 2011 I would normally use an HTML parser, but $page = file_get_contents('http://www.myfreepost.com/lottery/index.php/us/newyorklottery/takefive/result/'); preg_match( '~\d{1,2}-\d{1,2}-\d{1,2}-\d{1,2}-\d{1,2}~', $page, $match ); print_r( $match ); Link to comment https://forums.phpfreaks.com/topic/245913-screen-scraping-with-php/#findComment-1262972 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.