Javascript Example:
<script src="http://www.worthynews.com/syndication/formatted.php?using=js&api=YOURKEYGOESHERE"
type="text/javascript"></script>
How it looks on your site. The following example is displaying 3 articles from the World, Israel, and U.S. News categories. You can control how many articles are being listed by logging in and changing your settings for your API key.
PHP include example:
<?php echo file_get_contents('http://www.worthynews.com/syndication/formatted.php?api=YOURKEYGOESHERE'); ?>
Prime Minister Benjamin Netanyahu, Pastor John Hagee and radio personality Glenn Beck all spoke to Israel's Christian supporters during the sixth annual "Christians United for Israel" summit at the Convention Center in Washington, D.C..
Residents of southern Israel were sent back into bomb shelters this weekend as Gaza's terrorists stepped up their rocket launchings. Close to 20 were fired at Israeli civilians from Gaza over the past week – totaling 348 this year alone.
Although organizers of the Gaza flotilla claim they have no connection to terror, IDF military intelligence has evidence that reveals flotilla organizers received significant funding from groups that support Hamas and other terrorist groups.
The Barna Group recently surveyed Americans who attended church and reported on their worship experiences.
Christians around the world were among those remembering the 10th anniversary of the September 11 attacks on the United States, but pastors expressed concerns that in New York no clergy-led prayer was included in a ceremony near where the World Trade Center towers collapsed.
Yet another case of academic alien-ation in Roswell, New Mexico?
A lawsuit by Liberty Counsel alleges that the Roswell Independent School District retaliated against a school Christian group by suspending its members after giving Krispy Kreme doughnuts with Bible verses to their teachers; one student was sent home and two others spent a Saturday morning alone in a classroom for four hours.
Islamists have put up posters proclaiming that visitors to their east London borough are entering a "shar'ia controlled zone": smoking, alcohol and music are now unofficially "banned" in the borough of Tower Hamlets, as well as in the boroughs of Waltham Forest and Newham.
Anders Behring Breivik's 1,500-page manifesto shows that the Norwegian terrorist's depiction as a "right-wing, Christian fundamentalist" by many in the mass media may be as inaccurate as that of their so-called "Christian" bomber, Oklahoma City terrorist Tim McVeigh.
India's home minister says authorities believe the back-to-back blasts that killed at least 20 people in Mumbai were a "coordinated attack by terrorists."PHP Script Example:
See this page in action.
<?php
/**
* Sets a default action
*/
$news = '&get=listings';
/**
* Appends the article id of the individual article to display.
*/
if (isset($_GET['view'])) $news = '&get=item&id=' . $_GET['view'];
/**
* Gets the data.
* Decodes the json object into an array
*/
$url = 'http://www.worthynews.com/syndication/fetch.php?api=Your API code
goes here'
. $news;
$data = file_get_contents($url);
$data = json_decode($data, true);
/**
* Is data set, and make sure we're not trying to view an article.
*/
if (isset($data) && !isset($_GET['view'])) {
/**
* Loops through the data
*/
foreach ($data as $row) {
/**
* Show the category
*/
//echo '<h1 class="descriptor">' . $row['section'] . '</h1>';
/**
* Loops through the actual articles and display the links.
*/
for($i=0; $i < count($row['articles']); $i++) {
echo '<div style="clear:both"><a href="/index.php?view='
.
$row['articles'][$i]['post_id'] . '" class="news">' .
$row['articles'][$i]['post_title'] . '</a></div><div style="clear:both"><font
class="small">' .
html_entity_decode($row['articles'][$i]['post_excerpt']) . '</font></div><br
/>';
}
}
}
/**
* If someone clicks on an article, show it.
*/
if (isset($_GET['view'])) {
$data = array_map('htmlspecialchars_decode', $data);
$data['post_content'] = preg_replace('/<img[^>]+>/', '',
$data['post_content']);
/**
* Turn newline characters to the HTML <br />
*/
$data['post_content'] = nl2br($data['post_content']);
/**
* Spit out the data already.....
*/
echo <<<EOF
<h1 class="newsheader">{$data['post_title']}</h1>
<div class="findus">Posted on: {$data['post_date']}</div>
<div style="clear:both"><div class="news">{$data['post_content']}</div></div>
EOF;
}
?>
Below is an example of the output. You can control every aspect of the content!
Prime Minister Benjamin Netanyahu, Pastor John Hagee and radio personality Glenn Beck all spoke to Israel's Christian supporters during the sixth annual "Christians United for Israel" summit at the Convention Center in Washington, D.C..
Residents of southern Israel were sent back into bomb shelters this weekend as Gaza's terrorists stepped up their rocket launchings. Close to 20 were fired at Israeli civilians from Gaza over the past week totaling 348 this year alone.
Although organizers of the Gaza flotilla claim they have no connection to terror, IDF military intelligence has evidence that reveals flotilla organizers received significant funding from groups that support Hamas and other terrorist groups.
The Barna Group recently surveyed Americans who attended church and reported on their worship experiences.
Christians around the world were among those remembering the 10th anniversary of the September 11 attacks on the United States, but pastors expressed concerns that in New York no clergy-led prayer was included in a ceremony near where the World Trade Center towers collapsed.
Yet another case of academic alien-ation in Roswell, New Mexico?
A lawsuit by Liberty Counsel alleges that the Roswell Independent School District retaliated against a school Christian group by suspending its members after giving Krispy Kreme doughnuts with Bible verses to their teachers; one student was sent home and two others spent a Saturday morning alone in a classroom for four hours.
Islamists have put up posters proclaiming that visitors to their east London borough are entering a "shar'ia controlled zone": smoking, alcohol and music are now unofficially "banned" in the borough of Tower Hamlets, as well as in the boroughs of Waltham Forest and Newham.
Anders Behring Breivik's 1,500-page manifesto shows that the Norwegian terrorist's depiction as a "right-wing, Christian fundamentalist" by many in the mass media may be as inaccurate as that of their so-called "Christian" bomber, Oklahoma City terrorist Tim McVeigh.
India's home minister says authorities believe the back-to-back blasts that killed at least 20 people in Mumbai were a "coordinated attack by terrorists."