Hello,
i made this script for my home page, it's a simple way to do what you need, please consider it as a little example.
You'll need a 'WebBox' folder in the same place with the index.php, save the web page (Ex : my-home-page.htm) in WebBox and you can have somethings like : mysite.com/index.php?id=my-site (mysite.com/?id=my-site will do the same)
<?php
$ID=$_GET['id'];
if ($ID==""){
echo "You are now at the home page !";
} else {
Linker();
}
function Linker(){
global $ID;
$Path='WebBox/'.$ID.'.htm';
if (!file_exists($Path)){
echo "<center><br><font color=red face=tahoma size=2><b>This page is no longer exists ! <br>";
} else{
$Open = fopen("WebBox/".$ID."_title.txt", "r");
$Title = fread($Open,filesize("WebBox/".$ID."_title.txt"));
fclose($Open);
echo "<title>".$Title."</title>";
echo '
<style type="text/css">
body{margin-top:0cm;margin-left:0cm;margin-bottom:0cm;margin-right:0cm;}
</style>
<iframe src='."WebBox/".$ID.'.htm width=100% height=100% frameborder=0";></iframe>
';
}
}
?>
It would be better if you use include instead of echo a frame in your page, i've just relized this from the posts above.