0

I need a to grab the youtube line //www.youtube.com/embed/AMUHafKH0oY?wmode=opaque the ID AMUHafKH0oY is ever changing and i need it to automatically pull from that line ... off this page http://www.sequesteraccess.com/livefeed But it keeps grabbing from the first youtube video on the page instead so any advice on how to accomplish this? Any advice would be great thanks in advance!

Here is what i have tried so far

<?php
    function getURL($u){
        $ops = array(
          'http'=>array(
            'method'=>"GET",
            'header'=>"Accept: text/html\r\n" .
                      "User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0\r\n"
          )
        );
        $co = stream_context_create($ops);
        $r = file_get_contents('http://' . $u, false, $co);
        return $r != false ? $r : "";

    }
    function GetStringBetween($string, $start, $finish){
        $string = " ".$string;
        $position = strpos($string, $start);
        if ($position == 0) return "";
        $position += strlen($start);
        $length = strpos($string, $finish, $position) - $position;
        return substr($string, $position, $length);
    }
    $grab = file_get_contents('http://www.sequesteraccess.com/livefeed'); 
    $stream = GetStringBetween($grab, 'YOU ARE NEW TO SEQUE...&quot;&#125;,&quot;hSize&quot;:null,&quot;floatDir&quot;:null,&quot;html&quot;:&quot;&lt;iframe src=\&quot;//', '&amp');
?>
<?=$stream?>
Robert fr
  • 13
  • 4

0 Answers0