I am trying to add an RSS feed to my existing PHP page. I am getting this error when I attempt to load my page.
Error: URL missing.
This is the code in my php file:
<?php
error_reporting(0);
print "<link rel='stylesheet' href='rsslib.css' type='text/css'>\n";
include_once("rsslib.php");
$url=$_GET['rss_url'];
if(!$url)
print "Error: URL missing!";
else {
$m=$_GET['rss_items'];
if(!$m) $m=0;
$ch=$_GET['rss_chars'];
if(!$ch) $ch=0;
$t=$_GET['rss_target'];
if(!$t) $t="_blank";
$css=$_GET['rss_css'];
if(!$css) $css="rsslib";
rss2html($url,$m,$ch,$t,$css);
}
?>[/color]
Any ideas why this is not working?
Need Help-RSS Parser
Moderator: General Moderators
Re: Need Help-RSS Parser
Well based on the code, you need to append the rss feed's url to the url of the current script.
eg. index.php?rss_url=www.google.ie
eg. index.php?rss_url=www.google.ie
Re: Need Help-RSS Parser
$url=$_GET['rss_url'];
So are you saying in this line within the code substitue within the "[]" brackets
$url=$_BET[index.php?rss_url=www.google.ie]
So are you saying in this line within the code substitue within the "[]" brackets
$url=$_BET[index.php?rss_url=www.google.ie]
Re: Need Help-RSS Parser
Noaea wrote:$url=$_GET['rss_url'];
So are you saying in this line within the code substitue within the "[]" brackets
$url=$_BET[index.php?rss_url=www.google.ie]
Code: Select all
$url=$_GET['rss_url'];
if(!$url)
print "Error: URL missing!";