Page 1 of 1

can we take the news from NEWS site and display in our page

Posted: Mon May 01, 2006 2:15 am
by dibyendrah
Hello everybody,
I want to display the news title from any news site and display somewhere in my page. Has anybody done this kind of project ?

Any kind of help will be appreciated.

Thank you,
Dibyendra

Posted: Mon May 01, 2006 4:44 am
by s.dot
Do you have permission to use the content?

If so; does the news site provide a feed for you to use?

If they do not provide a feed, you could use a regex solution.

Code: Select all

$file = file_get_contents('http://www.somenewssite.com/news.html');

preg_match("#<a href=\"something\"><someuniqueHTML>(*+?)</enduniqueHTML>#",$file,$matches;

echo '<pre>';
print_r($matches);
echo '</pre>';

Posted: Tue May 02, 2006 1:51 am
by dibyendrah
Thank you scottayy so much for your kind reply.
I'll use the news title from news site if they allow me to use. But, I just wanted to make sure if it is possible or not. I'll need this in future fr my application.

Cheers,
Dibyendra

Posted: Tue May 02, 2006 8:52 am
by John Cartwright
You might want to read their terms of service, the majority of sites strictly prohibit this kind of behavior.

Posted: Wed May 03, 2006 12:40 pm
by a94060
Jcart wrote:You might want to read their terms of service, the majority of sites strictly prohibit this kind of behavior.
if we say it is provided by this site,etc cnn.com,would we be able to still use it?

Posted: Wed May 03, 2006 12:41 pm
by feyd
That would be up to their terms of service.