I have the following iFrame HTML:
<html>
<iframe src="page.php" id="ifrm" height = 100% width = 100% ></iframe>
</table>
</html>
I use it to display PHP inside an html page.
However, iframes are giving me a very hard time. Is there any other solution without using an iFrame?
What i Need basically is for the HTML page to display the php page without changing the browser url.
BTW: Both pages are on different servers.
Thx!
You could try just reading the file in with file_get_contents
, and then print it:
<?php
$sContent = file_get_contents('page.php'); //Replace 'page.php' with the full URI to the pages you want to show
print ($sContent);
?>
This will work with most server setups, although not always.
You can use the function file_get_contents('http://urlforsite.com/page')
$externalWebsite = 'http://externalsite.com/page';
$externalContent = file_get_contents($externalWebsite);
echo $externalContent;