$url="http://example.com";
$html = file_get_contents($url);
$doc = new DOMDocument();
@$doc->loadHTML($html);
$tags = $doc->getElementsByTagName('img');
foreach ($tags as $tag) {
echo $tag->getAttribute('src');
}
More Related Contents:
- Turn Plain Text URLs into Active Links using PHP [closed]
- How do you parse and process HTML/XML in PHP?
- How do you parse and process HTML/XML in PHP?
- Extract URLs from text in PHP
- How do you parse and process HTML/XML in PHP?
- How to replace text URLs and exclude URLs in HTML tags?
- PHP Regular expression to match keyword outside HTML tag
- Strip all HTML tags, except allowed
- RegExp to strip HTML comments
- Need a good regex to convert URLs to links but leave existing links alone
- Parsing HTML files as PHP
- php regex to get string inside href tag
- Web scraping in PHP
- How to get Open Graph Protocol of a webpage by php?
- Count all HTML tags in page PHP
- Regex matching table rows in HTML [duplicate]
- How to convert multiple tag to a single tag in php
- Regex ignore URL already in HTML tags
- PHP/regex: How to get the string value of HTML tag?
- The character encoding of the HTML document was not declared
- How to validate phone number using PHP? [duplicate]
- What does [\S\s]* mean in regex in PHP?
- Conditional Statements in PHP code Between HTML Code
- How to keep form values after post [duplicate]
- UTF-8 in PHP regular expressions [duplicate]
- Detect Ajax calling URL
- Get non-numeric characters then number on each line of a block of texf
- How to assign Php variable value to Javascript variable? [duplicate]
- jQuery Mobile: Sending data from one page to the another
- Validate date format in php