]> git.mxchange.org Git - friendica.git/commitdiff
bug #346 - add oembed maxwidth to oembed request
authorfriendica <info@friendica.com>
Sun, 25 Mar 2012 04:26:50 +0000 (21:26 -0700)
committerfriendica <info@friendica.com>
Sun, 25 Mar 2012 04:26:50 +0000 (21:26 -0700)
include/oembed.php

index cc71f9757c9208ffcdcd31ac5d8c4de38a53b24b..1f45d2814325449ce5816e564fd7545b9ea2a4c9 100755 (executable)
@@ -38,7 +38,8 @@ function oembed_fetch_url($embedurl){
                                        $entries = $xpath->query("//link[@type='application/json+oembed']");
                                        foreach($entries as $e){
                                                $href = $e->getAttributeNode("href")->nodeValue;
-                                               $txt = fetch_url($href);
+                                               $txt = fetch_url($href . '&maxwidth=425');
+                                               break;
                                        }
                                }
                        }
@@ -46,7 +47,7 @@ function oembed_fetch_url($embedurl){
                
                if ($txt==false || $txt==""){
                        // try oohembed service
-                       $ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl);  
+                       $ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl).'&maxwidth=425';  
                        $txt = fetch_url($ourl);
                }