-#Download CSS styles from an OPML list
###Download CSS styles for shaarlis listed in an opml file
Example php script:
$opmlXml = simplexml_load_string($opml);
$outlineElements = $opmlXml->xpath("body/outline");
foreach($outlineElements as $site) {
- $siteUrl = siteUrl((string) $site['htmlUrl']);[](.html)
- $result[$siteUrl]=((string) $site['text']);[](.html)
+ $siteUrl = siteUrl((string) $site['htmlUrl']);
+ $result[$siteUrl]=((string) $site['text']);
}
return $result;
}
function get_http_response_code($theURL) {
$headers = get_headers($theURL);
- return substr($headers[0], 9, 3);[](.html)
+ return substr($headers[0], 9, 3);
}
/**
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);](-=-realpath($realPath-.-"/"-.-$file);.html)
+ $results[] = realpath($realPath . "/" . $file);
}
}
// tidy up: close the handler
$configFile = $folder."/config.ini";
if(file_exists($configFile)) {
$iniParameters = parse_ini_file($configFile);
- array_push($result, $iniParameters['site_url']);[](.html)
+ array_push($result, $iniParameters['site_url']);
}
}
return $result;
copyUserStylesFrom(createShaarliHashFromOPMLL(SHAARLI_RSS_OPML), $knownStyles);
<!--- ? ---->
-```
+```
\ No newline at end of file