+#Download CSS styles from an OPML list
###Download CSS styles for shaarlis listed in an opml file
Example php script:
-```
+```php
<!---- ?php -->
<!---- Copyright (c) 2014 Nicolas Delsaux (https://github.com/Riduidel) -->
<!---- License: zlib (http://www.gzip.org/zlib/zlib_license.html) -->
$opmlXml = simplexml_load_string($opml);
$outlineElements = $opmlXml->xpath("body/outline");
foreach($outlineElements as $site) {
- $siteUrl = siteUrl((string) $site['htmlUrl']);
- $result[$siteUrl]=((string) $site['text']);
+ $siteUrl = siteUrl((string) $site['htmlUrl']);[](.html)
+ $result[$siteUrl]=((string) $site['text']);[](.html)
}
return $result;
}
function get_http_response_code($theURL) {
$headers = get_headers($theURL);
- return substr($headers[0], 9, 3);
+ return substr($headers[0], 9, 3);[](.html)
}
/**
while ($file = readdir($handler)) {
// if file isn't this directory or its parent, add it to the results
if ($file != "." && $file != "..") {
- $results[] = realpath($realPath . "/" . $file);
+ $results[ = realpath($realPath . "/" . $file);](-=-realpath($realPath-.-"/"-.-$file);.html)
}
}
// tidy up: close the handler
$configFile = $folder."/config.ini";
if(file_exists($configFile)) {
$iniParameters = parse_ini_file($configFile);
- array_push($result, $iniParameters['site_url']);
+ array_push($result, $iniParameters['site_url']);[](.html)
}
}
return $result;