Hi, i'm trying to include some page
in my PHP page.
The page to include is a php page,
that contains some results (this page can be included in other website)
My page is also in PHP, but i experiencing some problems
I have try these codes, i don't see my erros ... so if you can help me
(it doesn't work with html also)
//$file = "http://vbfan.vbhainaut.com/GenClas.php?div=P2BM";
echo $file;
// Load the file into a variable.
$o = fopen($file, "rb");
$c = fread($o, filesize($file));
fclose($o);
echo $c;
// Get stuff between the body tags.
$sA = explode("<body>", $c);
$sB = explode("</body>", $sA[1]);
$contents = $sB[0];
// Echo the contents.
echo $contents;
Import Php in a php Page
Moderator: General Moderators
Ha. My code is finally getting around I see 
I'm not 100% sure what you are asking but the code changes have basically killed it. Try this...
I'm not 100% sure what you are asking but the code changes have basically killed it. Try this...
Code: Select all
<?
$file = "http://vbfan.vbhainaut.com/GenClas.php?div=P2BM";
//echo $file; //what's this here for?
// Load the file into a variable.
$o = fopen($file, "rb");
$c = fread($o, filesize($file));
fclose($o);
//echo $c; //don't need this here.
// Get stuff between the body tags.
$sA = explode("<body>", $c);
$sB = explode("</body>", $sA[1]);
$contents = $sB[0];
// Echo the contents.
echo $contents;
?>