如何在simplpie库中验证RSS提要URL

I want to validate RSS feed URL before its process for parsing. I am using willvincent/feeds library for this.

$feed = Feeds::make($rssurl);
$items =  $feed->get_items();

I am parsing RSS feed like above.

So how can validate the RSS feed URL before parsing using willvincent/feeds library.

'willvincent/feeds' is just a service provider for Laravel. You should refer to SimplePie documentation, and use the error() method to check if url throws errors. This method holds the error description.

$feed = Feeds::make('http://some-bogus-feed-url');

if($feed->error()){ 
//handle the feed error 
}