Horje
How to add PHP File Get Content

The file_get_contents() function in PHP is an inbuilt function that is used to read a file into a string. The function uses memory mapping techniques that are supported by the server and thus enhance the performance making it a preferred way of reading the contents of a file. The path of the file to be read, which is sent as a parameter to the function and it returns the data read on success and FALSE on failure.


Full Code

index.php
Example: PHP
<!DOCTYPE html>   
<body> 
    <?php 
        // Reading contents from the 
        // geeksforgeeks homepage 
        $homepage = file_get_contents( 
            "https://horje.com/"); 
        echo $homepage; 
    ?> 
</body> 
</html>

Output should be:

Full Code





Related Articles
How to add PHP File Get Content PHP URL/LINK Tutorial
How to add PHP cURL CURLOPT PHP URL/LINK Tutorial
How to load XML Sitemap URLs PHP URL/LINK Tutorial
How to get file size from a remote url in PHP PHP URL/LINK Tutorial

Single Articles
Full CodePHP URL/LINK Tutorial

Read Full:
PHP URL/LINK Tutorial
Category:
Web Tutorial
Sub Category:
PHP URL/LINK Tutorial
Uploaded:
10 months ago
Uploaded by:
Admin
Views:
14



Share on: