How can I load the content of a web page into a variable?
I need to store the HTML in a string.
The code below stores the content of the site w3schools.com into a variable.
$my_var = file_get_contents('http://www.w3schools.com');
echo $my_var;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With