How to create static html page from dynamic php page

  • Opportunity to working on live project
  • Learn Advance topic in low cost
  • Get experience certificate
  • Learn Advance topic in limited time period
  • Get job opportunity
  • Topic cover on fast track
<?php
include ("include/conn.php");
error_reporting(E_ALL);
ini_set('display_errors', '1');
$cmdm="select * from satta_cms";
 $resultm=mysqli_query($link,$cmdm); 
 if($rowm=mysqli_fetch_array($resultm)){ 
	 $srno=$rowm['srno']; 
	 $message1=nl2br($rowm['message1']); 
	 $message2=nl2br($rowm['message2']); 
	 $message3=nl2br($rowm['message3']); } 
date_default_timezone_set('Asia/Kolkata');
$cmd1="select * from record"; $result1=mysqli_query($link,$cmd1);
 while($row1=mysqli_fetch_array($result1)){
	  $recno=$row1['recno'];
	 $tablename=$row1['tablename'];
			
 $cmd="select * from $tablename";
$result=mysqli_query($link,$cmd);
while($row=mysqli_fetch_array($result)){
	$recname=$row['recname'];
	$recdate=$row['recdate'];
	$rec=$row['new'];
	$recdispdate=date('d-M-Y',strtotime($recdate)); 
	ob_start();
?>
 
<!DOCTYPE html>
<html lang="en">
<head>
  <?php include('common/head.php'); ?>
 <style>
 h1.text-center {
    background-color: #000000;
    color: white !important;
    padding: 15px;
    text-align: center;
}
 </style>
  </head>
  <body>
<?php include('common/nav.php'); ?>


<div class="container">
<div class="row">
<?php include('common/advertise1.php'); ?>
<div class="col-lg-12"><h1 class="text-center"><?php echo date('d-M-Y',strtotime($recdate)); ?></h1></div>
<div class="live text-center">
    <h1><img src="satta-king.gif" width="70px"></h1>
 <div id="recbadge"> <h4 id="rectime"><?php echo $rec;?></h4><h2 id="recname" class="text-uppercase"><?php echo $recname;?></div>
 </div>

</div>
<hr>

</div>


<div class="container">
<div class="row">
<div class="col-lg-12">
<?php include('common/advertise0.php'); ?>
<?php include('common/message1.php'); ?>
<?php include('common/message2.php'); ?>
<?php include('common/message3.php'); ?>
    <?php include('common/advertise.php'); ?>
<?php //$cmd="select * from record order by rectime"; include('common/record-display.php');
?>
</div>
</div>
</div>
<?php
include('common/script.php');
 ?>

  </body>
</html>
<?php


$MainDir="satta-king-result";
 if(!is_dir($MainDir))
{
	mkdir($MainDir,0777);
}
$fileName=str_ireplace(' ','-',$recname).'-'.$recdispdate;

//
//$fp=fopen($MainDir.$QuestionId.".html","w");
$fp=fopen($MainDir."/".$fileName.".html","w");
$html = ob_get_contents();
fputs($fp,$html);


  } } ?>

Leave a Reply