xplosive Posted May 29, 2010 Share Posted May 29, 2010 Is it possible to make a PHP script, that retrieves date from another website, and displays on your website. Perhaps an example would be football scores? Say if I wanted to read certain data on BBC Sport Page, and echo/ print it on my website? If so, how would I go about doing this? Thanks! Quote Link to comment Share on other sites More sharing options...
ignace Posted May 29, 2010 Share Posted May 29, 2010 Regex, DomDocument (in combination with DomXPath), Service, .. Quote Link to comment Share on other sites More sharing options...
xplosive Posted May 29, 2010 Author Share Posted May 29, 2010 Can you give me an example? Not sure how it all works. Quote Link to comment Share on other sites More sharing options...
xplosive Posted May 29, 2010 Author Share Posted May 29, 2010 Anyone? =P Quote Link to comment Share on other sites More sharing options...
ignace Posted May 29, 2010 Share Posted May 29, 2010 Can you give me an example? Not sure how it all works. libxml_use_internal_errors(true); $dom = new DomDocument(); if ($dom->loadHtmlFile('http://../file.html')) { $xpath = new DomXPath($dom); foreach ($xpath->query('//td[@score]') as $node) { print $node->nodeValue . "<br />\n"; } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.