Reddit/Embedly.php
authorAlan Knowles <alan@roojs.com>
Tue, 9 Dec 2014 08:43:14 +0000 (16:43 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 9 Dec 2014 08:43:14 +0000 (16:43 +0800)
Reddit/Embedly.php

index d93968b..dde2323 100644 (file)
@@ -9,8 +9,14 @@ class Reddit_Embedly extends HTML_FlexyFramework_Page {
     function get()
     {
         
-        $this->getTwitter();
-        exit;
+        $raw_ul = $_REQUEST['url'];
+        $ar = parse_url($raw_ul);
+        if (preg_match('/twitter/i', $ar['host'])) {
+            $this->getTwitter();
+            exit;
+        }
+        
+        
         
         $url = htmlspecialchars($_REQUEST['url']);