Hello everyone,
Does anyone know how to get data from another website, i.e. getting latest sport news from bbc and publish on mysite. I have looked around and found a php method called cURL. Does anyone have examples on how to filter the data that cURL returns.
Also is there other ways of doing this.
Your help would be greatly appreciated.
Thanks
Sid.
How to get data from other websites
Moderator: General Moderators
Re: How to get data from other websites
If all your are looking for is a small part of the info on the site, like BBC sports news, I bet they have them in RSS format or something like that.
Re: How to get data from other websites
try these links and come back if you still need help:
http://en.wikipedia.org/wiki/RSS_(file_format)
http://www.ibm.com/developerworks/libra ... index.html
http://rssphp.net/
using RSS PHP this should get you started:
http://en.wikipedia.org/wiki/RSS_(file_format)
http://www.ibm.com/developerworks/libra ... index.html
http://rssphp.net/
using RSS PHP this should get you started:
Code: Select all
<?php
$rss = new rss_php;
$rss->load('http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/football/rss.xml');
$items = $rss->getItems(); #returns all rss items
?>