Snippets tagged “domdocument”
4 snippets use this tag.
- Getting title and meta tags from external websitePHP
In PHP, you can use the file_get_contents() function to retrieve the HTML code of a website, and then use regular expressions or a DOM parsing library to extract the title and meta tags.
- PHP/regex: How to get the string value of HTML tag?PHP
In PHP, you can use the preg_match() function to extract the string value of an HTML tag.
- Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity,PHP
This error message is indicating that there is an issue with an entity reference in the HTML code being parsed by the DOMDocument class.
- XML Parse Error - Extra content at the end of the documentPHP
This error message typically occurs when there is additional content or characters after the closing root element in an XML document.