priya@123
10-26-2013, 05:01 AM
Hi,
The following code is related to displaying banner and background in dynamic html pages. Banner is displaying in html pages but background is not displayed .Can u please check the code.
view.php:
-------------
<?php
@session_start();
@ob_start();
require('simple_html_dom.php');
//get random number
$random = $_GET["id"];
$banner = $_GET["banner"];
$background = $_GET["background"];
$z="uploadbanner/";
$a="uploadbackground/";
$bannerid= substr_replace($z,$banner,14,0);
$backgroundid= substr_replace($a,$background,18,0);
$html=file_get_html('player.php');
$ele3=$html->getElementById('test3');
$ele4=$html->getElementById('test4');
$ele3->setAttribute('src',$bannerid);
$ele4->setAttribute('src',$backgroundid);
$n=file_put_contents("$name.html",$html);
$page=$name.'.html';
header("Location: http://localhost/sample/$page");
ob_flush();
exit;
?>
player.php:
-----------------
<body>
<img id="test3" src="" width="1600" height="200"> //for displaying banner
------how to write for background----------
-
</body>
Thanks,
Priya
The following code is related to displaying banner and background in dynamic html pages. Banner is displaying in html pages but background is not displayed .Can u please check the code.
view.php:
-------------
<?php
@session_start();
@ob_start();
require('simple_html_dom.php');
//get random number
$random = $_GET["id"];
$banner = $_GET["banner"];
$background = $_GET["background"];
$z="uploadbanner/";
$a="uploadbackground/";
$bannerid= substr_replace($z,$banner,14,0);
$backgroundid= substr_replace($a,$background,18,0);
$html=file_get_html('player.php');
$ele3=$html->getElementById('test3');
$ele4=$html->getElementById('test4');
$ele3->setAttribute('src',$bannerid);
$ele4->setAttribute('src',$backgroundid);
$n=file_put_contents("$name.html",$html);
$page=$name.'.html';
header("Location: http://localhost/sample/$page");
ob_flush();
exit;
?>
player.php:
-----------------
<body>
<img id="test3" src="" width="1600" height="200"> //for displaying banner
------how to write for background----------
-
</body>
Thanks,
Priya