From: friendica Date: Sun, 25 Mar 2012 04:26:50 +0000 (-0700) Subject: bug #346 - add oembed maxwidth to oembed request X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d06ddeb1cc6c1bbc7c1f297a917714002839cf85;p=friendica.git bug #346 - add oembed maxwidth to oembed request --- diff --git a/include/oembed.php b/include/oembed.php index cc71f9757c..1f45d28143 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -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); }