channel_exists

(ReachRSS >= 0.91)
channel_exists -- Checks if the specified channel exists (if it's subscribed to) or not

Description

boolean channel_exists ( string channel_url )

This function checks if the channel is currently being monitored by ReachRSS (is it subscribed to?) and returns true if it is, false if it isn't.

Example 1. channel_exists() example

$ReachRSS = new ReachRSS();
$ReachRSS->Startup();
$ReachRSS->add_channel("http://www.comicalert.com/public/popular24.xml");
$Exists = $ReachRSS->channel_exists(
                       "http://www.comicalert.com/public/popular24.xml"
                     );
if ($Exists) print "It exists!"; else print "It doesn't exist."

This example will subscribe ReachRSS to the "most popular comics" feed at Comic Alert! and then check if it exists in Reach's current list of channels.

See also add_channel(), remove_channel(), channels()

Back to Function List

 

Home | Features | Samples | Demo | Download | Register | Help / Support