How can a page be loaded into a frame using PHP?

To load a page into a frame using PHP, you can use the "file_get_contents" function to retrieve the content of the page and then echo it within the frame tag in your PHP file.

<?php
$url = 'https://www.example.com/page-to-load.html';
$content = file_get_contents($url);
echo '<iframe srcdoc="'.$content.'" style="width:100%; height:500px;"></iframe>';
?>