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
can we take the news from NEWS site and display in our page
Moderator: General Moderators
- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
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.
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>';Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact: