3v4l.org

run code in 300+ PHP versions simultaneously
<?php $score_url = 'http://vowgag.com/to/23335/'; $headers = get_headers($score_url); $response = substr($headers[0], 9, 3); $html = file_get_contents($score_url); $html2 = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8"); $classname = 'entry-content'; $ogtitle = 'og:title'; $dom = new DOMDocument; $dom->loadHTML($html2); $xpath = new DOMXPath($dom); //$results = $xpath->query("(//div[@class='" . $classname . "'])[1]/p/a[1]"); $results2 = $xpath->query("(//div[@class='" . $classname . "'])[1]/p/a[1]/img[1]/@src"); $results3 = $xpath->query("//meta[@property='" . $ogtitle . "']/@content"); foreach ($results2 as $parseimg){ $parseimgurl = parse_url($parseimg->nodue.""); } echo $parseimgurl;

preferences:
52.07 ms | 402 KiB | 5 Q