0

Hello I could help several days ago I am trying to make this code work. I am trying to remove from an html the <video> tag that is inside a <nonscript>.

Example

<noscript>
        <video style="width:100%; height:100%;"
               controls="controls"
               autobuffer="autobuffer"
               class="player-html5"
               preload="metadata"
               poster="15.jpg">
            <source src="hello.mp4" type="video/mp4">
        </video>
    </noscript>

The code that I have is like this but does not return anything.

function vide($source){ 
    preg_match("'<noscript>(.*?)</noscript>'", $source, $match);
    if($match){ 
        return $match[1];
    }
}

Could you use the the dom document?

I just need everything found in the html video tag.

Sorry for my bad english and thanks

Wiktor Stribiżew
  • 484,719
  • 26
  • 302
  • 397
gamau6
  • 39
  • 7

0 Answers0