Skip to content

Instantly share code, notes, and snippets.

@lealeelu lealeelu/ohms-viewer.tmpl.php Secret
Created May 28, 2015

What would you like to do?
File added to make ohms viewer work.
$dom = new DOMDocument;
$html = file_get_contents($cacheFile->media_url);
$xpath = new DOMXPath($dom);
$nlist = $xpath->query("//link[@type='application/json+oembed']/@href");
$oembed = $nlist->item(0)->nodeValue;
$oembed = $oembed . "&maxwidth=270";
echo $oembed;
$html_oembed = file_get_contents($oembed);
$jsond = json_decode($html_oembed);
echo $jsond->html;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.