php file_get_contents

This function is the preferred way to read the contents of a file into a string.
The function itself does nothing but puts the source of the web page you
supply it into a string available for use throughout your script.

echo file_get_contents("dtd.txt");

You can use either the curl or the http library. You send a http request, and can use the library to get the information from the http response.

$dat = @file_get_contents( "" );
if( $dat ) echo htmlentities( $dat );