There may come a time when you would would like to capture a web pages HTML.
The following command will retrieve the pages content and store the HTML is a variable “$fil”. These PHP commands execute withing the proper PHP tags.
$fil = file_get_contents ( 'https://archbrooks.us/b4/2016/06/17/bcs-anaconda-date/' );
To save the contents of ‘$fil” to a text file simply issue the following command.
echo file_put_contents ( "C:\\dev\\w32\\2016\\xxx.txt", $fil );
Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.