Help with RSS Reader

Hi there, I am fairly new to php and programming in general.
A quick breakdown, I am using a Raspberry-pi as a digital sign, and using Screenly open source it will just rotate between a couple different pages to show different assets.
One of these assets will be a webpage showing current weather warnings here in Australia.
I have created a very basic single sign type page, with a php rss reader.
The trouble I am running into, I am trying to set it up so, if there is an item in the RSS, it will display the item, along with a flashing alert.
If the RSS is empty (no storm warning) it should hide the div with the flashing alert, and display “no current warnings”

in my index I have set up

[php]<?php
require_once(“rsslib.php”);
$url = “Weather Warnings for Queensland. Issued by the Australian Bureau of Meteorology”;
$RSS123 = RSS_Display($url, 5, false, false);
if(count($RSS123) < 1)

	{ 

echo $RSS123;

}

else

{
		echo '<div id="no_warning"> There are no current weather warnings</div>';
		echo  '<style>
		#flashing_wrapper{
		display:none;
		} </style>';		

}
?>[/php]

But no matter what I do, I cannot get this to work for the life of me.

I have attached the two files I am working with, the display along with the rsslib.php

Any help would be much appreciated.


rss-direct.txt (2.41 KB)

rsslib.txt (3.49 KB)

Sponsor our Newsletter | Privacy Policy | Terms of Service