Skip to content
Advertisement

How can I get src of video from HTML

on example.com is <video> like:

JavaScript

and I would like to get content of src="" which is inside of that <video> tag

(example.com is not my website, I need to use PHP to get to the HTML code and get the src from the video tag)

thank you!

Advertisement

Answer

Quick and dirty way

JavaScript

A better way is to use web scraping/crawling tools like FriendsOfPHP/Goutte

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement