PHP 8.5.0 Beta 1 available for testing

Voting

: two plus zero?
(Example: nine)

The Note You're Voting On

qrworld.net
10 years ago
In this post http://softontherocks.blogspot.com/2014/11/descargar-el-contenido-de-una-url_11.html I found a simple way to get the content of a URL with DOMDocument, loadHTMLFile and saveHTML().

function getURLContent($url){
$doc = new DOMDocument;
$doc->preserveWhiteSpace = FALSE;
@$doc->loadHTMLFile($url);
return $doc->saveHTML();
}

<< Back to user notes page

To Top