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. <?php 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( "http://www.bbc.co.uk/" ); if( $dat ) echo htmlentities( $dat ); |
php file_get_contents
PMA00:44
Categories: PHP