PHP Code file_get_contents - Php

How to get the contents of a website using PHP code?

Snippet Code

Rate this page :
  [ 0 votes]

The PHP file_get_contents function is used to read files into a string. Here, the below code can be used to get html contents from "" website using file_get_contents().

<?php $homepage = file_get_contents(''); echo $homepage; ?>


Ask Questions

Ask Question