Hello,
We have had an RSS feed from another website working for literally years, all of a sudden it's stopped working.
Why would this have happened? If I go to the website / RSS URL it loads in my browser fine, what could be stopping the following code from working?
it seems to hang on this line
All help appreciated.
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts
We have had an RSS feed from another website working for literally years, all of a sudden it's stopped working.
Why would this have happened? If I go to the website / RSS URL it loads in my browser fine, what could be stopping the following code from working?
Code:
#######################
# Use Template Module #
#######################
use Template;
##################
# Use RSS Module #
##################
use RSS;
##################
# Use LWP Module #
##################
use LWP::Simple;
my $i = -1;
# create new instance of XML::RSS for Mortgages
my $rss = new XML::RSS;
# Read current Mortgages XML RSS Feed
my $url = "[URL unfurl="true"]http://www.mortgages.co.uk/news/rss/latest.xml";[/URL]
$rss->parse(get $url);
# Set Array
my (@mornews);
# Loop RSS & create Array
foreach my $item (@{$rss->{'items'}}) {
$i++;
$mornews[$i]->{'title'} = $item->{'title'};
$mornews[$i]->{'link'} = $item->{'link'};
}
# Start template
my $template = HTML::Template->new( global_vars => 1,
type => 'filename',
source => DIR_TO_DOCS . '/templates/mortgage_news.htm',
die_on_bad_params => 0) or die "Cannot open mortgage_news.htm Template file: $!";
# Add variables to Template
$template->param( 'url_to_domain' => URL_TO_DOMAIN );
$template->param( 'url_to_cgi' => URL_TO_CGI );
$template->param( 'MortgageNews' => \@mornews );
# print template
print "Content-type: text/html\n\n";
print $template->output;
exit();
Code:
$rss->parse(get $url);
All help appreciated.
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts