Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $html = file_get_contents('https://tv-sewingcenter.com');
- $dom = new DOMDocument;
- libxml_use_internal_errors(true);
- $dom->loadHTML($html);
- $scripts = $dom->getElementsByTagName('script');
- if( ! empty( $scripts ) )
- {
- foreach( $scripts as $script )
- {
- if( $script->hasAttribute('type') && $script->getAttribute('type') == 'application/ld+json' )
- {
- echo $script->nodeValue;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement