Embed without Iframe

Iframes should not be used if alternatives are widely available. Create a php file called external.php and paste the below code into it.

<?php
$url="http://external.com/site.html";
$result = file_get_contents("$url");
echo $result;
?>

Now include the above file in your page using the include() function of php.

<?php include("/path/to/external.php");  ?>

Category PHP | Tags:

Leave a reply