[insert_php]
echo “
[/insert_php]
[insert_php]
echo “
// GET CFA RSS
$feed_url = “https://www.cfa.vic.gov.au/restrictions/tfbfdrforecast_rss.xml”;
// INITIATE CURL.
$curl = curl_init();
// CURL SETTINGS.
curl_setopt($curl, CURLOPT_URL,”$feed_url”);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);
// GRAB THE XML FILE.
$xmlTwitter = curl_exec($curl);
curl_close($curl);
// SET UP XML OBJECT.
// Use either one of these, depending on revision of PHP.
// Comment-out the line you are not using.
$xml = new SimpleXMLElement($xmlTwitter);
// $xml = simplexml_load_string($xmlTwitter);
// How many items to display
$count = 1;
// How many characters from each item
// 0 (zero) will show them all.
$char = 0;
foreach ($xml->channel->item as $item) {
if($char == 0){
$newstring = $xml->channel->item[0]->description;
}
else
{
$newstring = substr($xml->channel->item[0]->description, 0, $char);
}
$newstring3 = preg_replace(“/: /”, ” – “, $newstring);
$newstring2 = preg_replace(“/North Central/”, “Central North”, $newstring3);
if($count > 0){
// echo “$firerating “;
// echo “
“;
// echo “$newstring2″;
// CHECK RSS FOR FIRE DANGER RATING
if (strpos($newstring2, “Central – No Forecast”) !== false)
{
$firerating = ‘low’;
}
else
if ( strpos($newstring2, ‘Central – LOW-MODERATE’) !== false )
{
$firerating = ‘low’;
}
else
if ( strpos($newstring2, ‘Central – HIGH’) !== false )
{
$firerating = ‘high’;
}
else
if ( strpos($newstring2, ‘Central – VERY HIGH’) !== false )
{
$firerating = ‘veryhigh’;
}
else
if ( strpos($newstring2, ‘Central – SEVERE’) !== false )
{
$firerating = ‘severe’;
}
else
if ( strpos($newstring2, ‘Central – EXTREME’) !== false )
{
$firerating = ‘extreme’;
}
else
if ( strpos($newstring2, ‘Central – CODE RED’) !== false )
{
$firerating = ‘codered’;
}
// CHECK RSS IF TOTAL FIRE BAN YES OR NO
if (strpos($newstring2, “Central – Yes”) !== false) {
$tfb = ‘yes’;
}
if (strpos($newstring2, “Central – No – Restrictions may apply”) !== false) {
$tfb = ‘no’;
}
// CHANGE IMAGES
if (strpos($firerating, ‘low’)!== false )
{
echo “
echo “
{$xml->channel->item[0]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘veryhigh’)!== false )
{
echo “
echo “
{$xml->channel->item[0]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘high’)!== false )
{
echo “
echo “
{$xml->channel->item[0]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘severe’)!== false )
{
echo “
echo “
{$xml->channel->item[0]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘extreme’)!== false )
{
echo “
echo “
{$xml->channel->item[0]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘codered’)!== false )
{
echo “
echo “
{$xml->channel->item[0]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
}
$count–;
}
echo ‘‘;
echo “
“;
[/insert_php]
[insert_php]
echo “
[/insert_php]
[insert_php]
echo “
// GET CFA RSS
$feed_url = “https://www.cfa.vic.gov.au/restrictions/tfbfdrforecast_rss.xml”;
// INITIATE CURL.
$curl = curl_init();
// CURL SETTINGS.
curl_setopt($curl, CURLOPT_URL,”$feed_url”);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);
// GRAB THE XML FILE.
$xmlTwitter = curl_exec($curl);
curl_close($curl);
// SET UP XML OBJECT.
// Use either one of these, depending on revision of PHP.
// Comment-out the line you are not using.
$xml = new SimpleXMLElement($xmlTwitter);
// $xml = simplexml_load_string($xmlTwitter);
// How many items to display
$count = 1;
// How many characters from each item
// 0 (zero) will show them all.
$char = 0;
foreach ($xml->channel->item as $item) {
if($char == 0){
$newstring = $xml->channel->item[1]->description;
}
else
{
$newstring = substr($xml->channel->item[1]->description, 0, $char);
}
$newstring3 = preg_replace(“/: /”, ” – “, $newstring);
$newstring2 = preg_replace(“/North Central/”, “Central North”, $newstring3);
if($count > 0){
// echo “$firerating “;
// echo “
“;
// echo “$newstring2″;
// CHECK RSS FOR FIRE DANGER RATING
if (strpos($newstring2, “Central – No Forecast”) !== false)
{
$firerating = ‘low’;
}
else
if ( strpos($newstring2, ‘Central – LOW-MODERATE’) !== false )
{
$firerating = ‘low’;
}
else
if ( strpos($newstring2, ‘Central – HIGH’) !== false )
{
$firerating = ‘high’;
}
else
if ( strpos($newstring2, ‘Central – VERY HIGH’) !== false )
{
$firerating = ‘veryhigh’;
}
else
if ( strpos($newstring2, ‘Central – SEVERE’) !== false )
{
$firerating = ‘severe’;
}
else
if ( strpos($newstring2, ‘Central – EXTREME’) !== false )
{
$firerating = ‘extreme’;
}
else
if ( strpos($newstring2, ‘Central – CODE RED’) !== false )
{
$firerating = ‘codered’;
}
// CHECK RSS IF TOTAL FIRE BAN YES OR NO
if (strpos($newstring2, “Central – Yes”) !== false) {
$tfb = ‘yes’;
}
if (strpos($newstring2, “Central – No – Restrictions may apply”) !== false) {
$tfb = ‘no’;
}
// CHANGE IMAGES
if (strpos($firerating, ‘low’)!== false )
{
echo “
echo “
{$xml->channel->item[1]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘veryhigh’)!== false )
{
echo “
echo “
{$xml->channel->item[1]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘high’)!== false )
{
echo “
echo “
{$xml->channel->item[1]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘severe’)!== false )
{
echo “
echo “
{$xml->channel->item[1]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘extreme’)!== false )
{
echo “
echo “
{$xml->channel->item[1]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘codered’)!== false )
{
echo “
echo “
{$xml->channel->item[1]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
}
$count–;
}
echo ‘‘;
echo “
“;
[/insert_php]
[insert_php]
echo “
[/insert_php]
[insert_php]
echo “
// GET CFA RSS
$feed_url = “https://www.cfa.vic.gov.au/restrictions/tfbfdrforecast_rss.xml”;
// INITIATE CURL.
$curl = curl_init();
// CURL SETTINGS.
curl_setopt($curl, CURLOPT_URL,”$feed_url”);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);
// GRAB THE XML FILE.
$xmlTwitter = curl_exec($curl);
curl_close($curl);
// SET UP XML OBJECT.
// Use either one of these, depending on revision of PHP.
// Comment-out the line you are not using.
$xml = new SimpleXMLElement($xmlTwitter);
// $xml = simplexml_load_string($xmlTwitter);
// How many items to display
$count = 1;
// How many characters from each item
// 0 (zero) will show them all.
$char = 0;
foreach ($xml->channel->item as $item) {
if($char == 0){
$newstring = $xml->channel->item[2]->description;
}
else
{
$newstring = substr($xml->channel->item[2]->description, 0, $char);
}
$newstring3 = preg_replace(“/: /”, ” – “, $newstring);
$newstring2 = preg_replace(“/North Central/”, “Central North”, $newstring3);
if($count > 0){
// echo “$firerating “;
// echo “
“;
// echo “$newstring2″;
// CHECK RSS FOR FIRE DANGER RATING
if (strpos($newstring2, “Central – No Forecast”) !== false)
{
$firerating = ‘low’;
}
else
if ( strpos($newstring2, ‘Central – LOW-MODERATE’) !== false )
{
$firerating = ‘low’;
}
else
if ( strpos($newstring2, ‘Central – HIGH’) !== false )
{
$firerating = ‘high’;
}
else
if ( strpos($newstring2, ‘Central – VERY HIGH’) !== false )
{
$firerating = ‘veryhigh’;
}
else
if ( strpos($newstring2, ‘Central – SEVERE’) !== false )
{
$firerating = ‘severe’;
}
else
if ( strpos($newstring2, ‘Central – EXTREME’) !== false )
{
$firerating = ‘extreme’;
}
else
if ( strpos($newstring2, ‘Central – CODE RED’) !== false )
{
$firerating = ‘codered’;
}
// CHECK RSS IF TOTAL FIRE BAN YES OR NO
if (strpos($newstring2, “Central – Yes”) !== false) {
$tfb = ‘yes’;
}
if (strpos($newstring2, “Central – No – Restrictions may apply”) !== false) {
$tfb = ‘no’;
}
// CHANGE IMAGES
if (strpos($firerating, ‘low’)!== false )
{
echo “
echo “
{$xml->channel->item[2]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘veryhigh’)!== false )
{
echo “
echo “
{$xml->channel->item[2]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘high’)!== false )
{
echo “
echo “
{$xml->channel->item[2]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘severe’)!== false )
{
echo “
echo “
{$xml->channel->item[2]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘extreme’)!== false )
{
echo “
echo “
{$xml->channel->item[2]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘codered’)!== false )
{
echo “
echo “
{$xml->channel->item[2]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
}
$count–;
}
echo ‘‘;
echo “
“;
[/insert_php]
[insert_php]
echo “
[/insert_php]
[insert_php]
echo “
// GET CFA RSS
$feed_url = “https://www.cfa.vic.gov.au/restrictions/tfbfdrforecast_rss.xml”;
// INITIATE CURL.
$curl = curl_init();
// CURL SETTINGS.
curl_setopt($curl, CURLOPT_URL,”$feed_url”);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);
// GRAB THE XML FILE.
$xmlTwitter = curl_exec($curl);
curl_close($curl);
// SET UP XML OBJECT.
// Use either one of these, depending on revision of PHP.
// Comment-out the line you are not using.
$xml = new SimpleXMLElement($xmlTwitter);
// $xml = simplexml_load_string($xmlTwitter);
// How many items to display
$count = 1;
// How many characters from each item
// 0 (zero) will show them all.
$char = 0;
foreach ($xml->channel->item as $item) {
if($char == 0){
$newstring = $xml->channel->item[3]->description;
}
else
{
$newstring = substr($xml->channel->item[3]->description, 0, $char);
}
$newstring3 = preg_replace(“/: /”, ” – “, $newstring);
$newstring2 = preg_replace(“/North Central/”, “Central North”, $newstring3);
if($count > 0){
// echo “$firerating “;
// echo “
“;
// echo “$newstring2″;
// CHECK RSS FOR FIRE DANGER RATING
if (strpos($newstring2, “Central – No Forecast”) !== false)
{
$firerating = ‘low’;
}
else
if ( strpos($newstring2, ‘Central – LOW-MODERATE’) !== false )
{
$firerating = ‘low’;
}
else
if ( strpos($newstring2, ‘Central – HIGH’) !== false )
{
$firerating = ‘high’;
}
else
if ( strpos($newstring2, ‘Central – VERY HIGH’) !== false )
{
$firerating = ‘veryhigh’;
}
else
if ( strpos($newstring2, ‘Central – SEVERE’) !== false )
{
$firerating = ‘severe’;
}
else
if ( strpos($newstring2, ‘Central – EXTREME’) !== false )
{
$firerating = ‘extreme’;
}
else
if ( strpos($newstring2, ‘Central – CODE RED’) !== false )
{
$firerating = ‘codered’;
}
// CHECK RSS IF TOTAL FIRE BAN YES OR NO
if (strpos($newstring2, “Central – Yes”) !== false) {
$tfb = ‘yes’;
}
if (strpos($newstring2, “Central – No – Restrictions may apply”) !== false) {
$tfb = ‘no’;
}
// CHANGE IMAGES
if (strpos($firerating, ‘low’)!== false )
{
echo “
echo “
{$xml->channel->item[3]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘veryhigh’)!== false )
{
echo “
echo “
{$xml->channel->item[3]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘high’)!== false )
{
echo “
echo “
{$xml->channel->item[3]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘severe’)!== false )
{
echo “
echo “
{$xml->channel->item[3]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘extreme’)!== false )
{
echo “
echo “
{$xml->channel->item[3]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
else
if ( strpos($firerating, ‘codered’)!== false )
{
echo “
echo “
{$xml->channel->item[3]->title}
“;
echo “

“;
echo “
“;
if (stripos($tfb, “no”) !== false) {
echo “
(Restrictions May Still Apply)
“;
}
if (strpos($tfb, “yes”) !== false) {
echo “
Has Been Declared
“;
}
echo ‘
‘;
}
}
$count–;
}
echo ‘‘;
echo “
“;
[/insert_php]