X-Git-Url: https://git.ao2.it/tweeper.git/blobdiff_plain/d8950b148c6396251ac2fbc6ff3caab3e32b56e3..ef4f6c6fb10b121fa79a0d8b6ccd7930fec48591:/tweeper.php diff --git a/tweeper.php b/tweeper.php index a275a64..4050100 100755 --- a/tweeper.php +++ b/tweeper.php @@ -95,14 +95,9 @@ $url = parse_url($src_url); if (FALSE === $url || empty($url["host"])) die("Invalid url\n"); -$stylesheets = array( - "twitter.com" => "twitter_user_timeline2rss.xsl", -); - -if (FALSE === array_key_exists($url["host"], $stylesheets)) +$stylesheet = "rss_converter_" . $url["host"] . ".xsl"; +if (FALSE === file_exists($stylesheet)) die("Unsupported host\n"); -$stylesheet = $stylesheets[$url["host"]]; - $tweeper = new Tweeper($stylesheet); echo $tweeper->tweep($src_url);