Page 1 of 1

How to get data from other websites

Posted: Fri Aug 29, 2008 6:07 am
by saarshad
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.

Re: How to get data from other websites

Posted: Fri Aug 29, 2008 7:31 am
by Oren
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

Posted: Fri Aug 29, 2008 7:33 am
by panic!
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:

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
        
?>