skip to Main Content

Php – file_get_contents(URL) fails to return the source code

As the title says, why won't this code work? $homepage = file_get_contents('https://www.google.com'); echo $homepage; $file = 'code.txt'; file_put_contents($file, $homepage); Gives me the error "PHP Warning: file_get_contents(https://www.google.com): Failed to open stream: No such file or directory in C:UsersStevepublic_htmlindex.php on line 11"…

VIEW QUESTION
Back To Top
Search