I updated the meta-decector library..
To check out how it works, here's the updated code. (now with nifty comments).
- <?php
- // Inlude the parser
- require_once 'Sabre/Web/MetaParser.php';
- // Change this url
- $url = "http://www.rooftopsolutions.nl"
- // Create an instance
- $parser = new Sabre_Web_MetaParser($url);
- // Explicitly ask to locate and parse the RSD
- $parser->setFindRSD(true);
- // Start making the calls and return the outcome
- $sitemeta = $parser->exec();
- //Open a try..catch block
- try {
- // Dump the results on screen
- // This is simular to the demo on http://www.rooftopsolutions.nl/blogdetect
- echo '<pre>';
- print_r($sitemeta);
- } catch {Exception $e) {
- echo('Something bad happened: ' . $e->getMessage());
- }
- /*
- As you can see there's a code for the different feed and api types..
- you can try comparing those with the different constants:
- Sabre_Web_Blogging::ATOM
- Sabre_Web_Blogging::MOVABLETYPE
- Sabre_Web_Blogging::BLOGGER
- Sabre_Web_Blogging::METAWL
- and
- Sabre_Web_Feed::RSS19
- Sabre_Web_Feed::RSS20
- Sabre_Web_Feed::ATOM
- Sabre_Web_Feed::RDF
- */
- ?>
The changelog (warning: dry)
- Sabre_HTTP_Request now throws more usefull exceptions.
- Sabre_Web_MetaParser now returns integers for the RSS feed types and API types.
- Moved RSD code from Sabre_Web_MetaParser to to Sabre_Web_RSDParser.
- Fixed bugs related to some relative url's
