Hi Coders ,,
pls Help me 2 solve dis problem
i hav added RSS News Script in my site
Wats d Problem Is
news of 1st link in any 1 of feed vil be common 2 all links fetched ..
See here for ex: go 2 1st news link in abov page and also check next links all will hav same Title & news content
DEMO:
World NEWS
Pls HELP ME Guys Modify it and make it Work properly as dis link
GEOPAK 24x7 RSS NEWS
Here is its Script of d Page:
pls Help me 2 solve dis problem
i hav added RSS News Script in my site
Wats d Problem Is
news of 1st link in any 1 of feed vil be common 2 all links fetched ..
See here for ex: go 2 1st news link in abov page and also check next links all will hav same Title & news content
DEMO:
World NEWS
Pls HELP ME Guys Modify it and make it Work properly as dis link
GEOPAK 24x7 RSS NEWS
Here is its Script of d Page:
PHP Code:
<?
header("Content-Type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<link rel="stylesheet" type="text/css" href="./Style.css" />
<title>GEOPAK 24x7 RSS NEWS</title>
</head>
<body>
<div class="top">
<img src="./logo.gif" alt="" />
</div>
<div>
<b><small>World News</small></b>
</div>
<div class="content">
<?
$url = "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml";
$nocache = rand(0000, 9999);
$Id = $_GET["id"];
if ($Id != "")
{
$fp = @fopen($url, "r");
while (!feof($fp))
$raw .= @fgets($fp, 4096);
fclose($fp);
if (eregi("<item>(.*)</item>", $raw, $rawitems))
{
$items = explode("<item>", $rawitems[0]);
for ($i = 0; $i < 1; $i++)
{
eregi("<title>(.*)</title>", $items[$id + 1], $title);
eregi("<description>(.*)</description>", $items[$id + 1], $description);
eregi("<link>(.*)</link>", $items[$id + 1], $link);
echo "Title: " . $title[1] . " <br />\n";
echo "News: \n";
echo $description[1] . " <br />\n\n";
echo "<p align=\"center\">\n";
echo "<a href=\"./news.php?nocache=" . $nocache . "\">< Back</a>\n";
echo "</p>\n";
}
}
} else
{
$fp = @fopen($url, "r");
while (!feof($fp))
$raw .= @fgets($fp, 4096);
fclose($fp);
if (eregi("<item>(.*)</item>", $raw, $rawitems))
{
$items = explode("<item>", $rawitems[0]);
for ($i = 0; $i < count($items) - 1; $i++)
{
eregi("<title>(.*)</title>", $items[$i + 1], $title);
echo "<a href=\"./news.php?nocache=" . $nocache . "&id=" . $i . "\"><img src=\"./link.gif\" alt=\"\" />" . $title[1] . "</a> <br />\n";
}
}
}
?>
</div>
<div class="foot">
<a href="http://Geopakwap.com"><font color="#FFFFFF"><small>HOME</small></font></a>
</div>
</body>
</html>
Comment