ok i need to join all this pages to make 1 neat code

Posted on 16th Feb 2014 by admin

i have 5 pages that make up my tv guide it works 100% but i want to make it 1 page if i can or 2, i want it to have diff pages for each guide but all the code on 1 page i just dont know how to do it, i will post page each page here

main page
Code: <?php $ShowBookmark = "False"; include 'Include/Header.php'; ?>
<div class="hd2"><font color=#666666><strong><center>Tv Guide</center></strong></font></div>
<?
// Prints something like: 10th 2009f November 2009
$thedate = date('l dS F Y');
echo '
<center><font face="Verdana" size="2" color="blue"><u>' .$thedate. '</center></u></font>';
?>

<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/tvguide/sabc1-icon.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide-sabc1.php">Sabc 1</b></font></a>

</td></tr>
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/tvguide/sabc2-icon.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide-sabc2.php">Sabc 2</b></font></a>


</td></tr>
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/tvguide/sabc3-icon.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide-sabc3.php">Sabc 3</b></font></a>


</td></tr>
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/tvguide/etv-icon.jpg"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide-etv.php">Etv</b></font></a>

</td></tr>
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/tvguide/mnet-icon.jpg"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide-Mnet.php">Mnet</b></font></a>

</td></tr>


</table>
<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="index.php?cmd=100">Back</b></font></a>

</td></tr>
</table>
<hr>
<?php include 'Include/Footer.php'; Log_Hit("TvGuide"); ?>
this is sabc 1
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';

function GetGuide() {
$url = "http://mysite.com";
$RawData = @file_get_contents($url) or die('Could not access file: $url');
$Table = ExData($RawData,'<div style="font-size:12px; padding-top:15px; padding-left:9px">',"</div>");

$FGuide = $Table[2];

$i=2;
$upper = 60;

while ($i <= $upper) {
$FGuide = str_replace($i, '<font face="Verdana" color="red" size="2">' . $i . '</font>', $FGuide);
$i++;
}
$FGuide = str_replace('0', '<font face="Verdana" color="red" size="2">0</font>', $FGuide);
$FGuide = str_replace(1, '<font face="Verdana" color="red" size="2">1</font>', $FGuide);
$FGuide = str_replace(':', '<font face="Verdana" color="green" size="2">:</font>', $FGuide);

return $FGuide;

}

function ExData($text, $openingMarker, $closingMarker) {
$openingMarkerLength = strlen($openingMarker);
$closingMarkerLength = strlen($closingMarker);
$result = array();
$position = 0;
while (($position = strpos($text, $openingMarker, $position)) !== false) {
$position += $openingMarkerLength;
if (($closingMarkerPosition = strpos($text, $closingMarker, $position)) !== false) {
$result[] = substr($text, $position, $closingMarkerPosition - $position);
$position = $closingMarkerPosition + $closingMarkerLength;
}
}
return $result;
}
?>
<div class="hd2"><center><font color=#666666><strong><img src="Images/tvguide/sabc1.jpg"></strong></font></center></div>

<?
// Prints the date
$thedate = date('l dS F Y');
echo '<center><font face="Verdana" size="2" color="blue"><u>' .$thedate. '</center></u></font>';
?>

<font face="Verdana" size="2"><?php echo GetGuide(); ?></font>

<center><font face="Verdana" size="2"><?php echo $GLOBALS["Advert03"]; ?></font></center>
<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide.php">Back</b></font></a>

</td></tr>
</table>
<hr>

<?php include 'Include/Footer.php'; Log_Hit("TvGuide-sabc1"); ?>


this is sabc 2
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';

function GetGuide() {
$url = "http://mysite.com";
$RawData = @file_get_contents($url) or die('Could not access file: $url');
$Table = ExData($RawData,'<div style="font-size:12px; padding-top:15px; padding-left:9px">',"</div>");

$FGuide = $Table[3];
$i=2;
$upper = 60;

while ($i <= $upper) {
$FGuide = str_replace($i, '<font face="Verdana" color="red" size="2">' . $i . '</font>', $FGuide);
$i++;
}
$FGuide = str_replace('0', '<font face="Verdana" color="red" size="2">0</font>', $FGuide);
$FGuide = str_replace(1, '<font face="Verdana" color="red" size="2">1</font>', $FGuide);
$FGuide = str_replace(':', '<font face="Verdana" color="green" size="2">:</font>', $FGuide);

return $FGuide;
}

function ExData($text, $openingMarker, $closingMarker) {
$openingMarkerLength = strlen($openingMarker);
$closingMarkerLength = strlen($closingMarker);
$result = array();
$position = 0;
while (($position = strpos($text, $openingMarker, $position)) !== false) {
$position += $openingMarkerLength;
if (($closingMarkerPosition = strpos($text, $closingMarker, $position)) !== false) {
$result[] = substr($text, $position, $closingMarkerPosition - $position);
$position = $closingMarkerPosition + $closingMarkerLength;
}
}
return $result;
}
?>
<div class="hd2"><center><font color=#666666><strong><img src="Images/tvguide/sabc2.jpg"></strong></font></center></div>

<?
// Prints the date
$thedate = date('l dS F Y');
echo '<center><font face="Verdana" size="2" color="blue"><u>' .$thedate. '</center></u></font>';
?>

<font face="Verdana" size="2"><?php echo GetGuide(); ?></font>

<center><font face="Verdana" size="2"><?php echo $GLOBALS["Advert03"]; ?></font></center>
<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide.php">Back</b></font></a>

</td></tr>
</table>
<hr>

<?php include 'Include/Footer.php'; Log_Hit("TvGuide-sabc2"); ?>

this is sabc 3
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';

function GetGuide() {
$url = "http://mysite.com";
$RawData = @file_get_contents($url) or die('Could not access file: $url');
$Table = ExData($RawData,'<div style="font-size:12px; padding-top:15px; padding-left:9px">',"</div>");

$FGuide = $Table[4];
$i=2;
$upper = 60;

while ($i <= $upper) {
$FGuide = str_replace($i, '<font face="Verdana" color="red" size="2">' . $i . '</font>', $FGuide);
$i++;
}
$FGuide = str_replace('0', '<font face="Verdana" color="red" size="2">0</font>', $FGuide);
$FGuide = str_replace(1, '<font face="Verdana" color="red" size="2">1</font>', $FGuide);
$FGuide = str_replace(':', '<font face="Verdana" color="green" size="2">:</font>', $FGuide);

return $FGuide;
}

function ExData($text, $openingMarker, $closingMarker) {
$openingMarkerLength = strlen($openingMarker);
$closingMarkerLength = strlen($closingMarker);
$result = array();
$position = 0;
while (($position = strpos($text, $openingMarker, $position)) !== false) {
$position += $openingMarkerLength;
if (($closingMarkerPosition = strpos($text, $closingMarker, $position)) !== false) {
$result[] = substr($text, $position, $closingMarkerPosition - $position);
$position = $closingMarkerPosition + $closingMarkerLength;
}
}
return $result;
}
?>
<div class="hd2"><center><font color=#666666><strong><img src="Images/tvguide/sabc3.jpg"></strong></font></center></div>

<?
// Prints the date
$thedate = date('l dS F Y');
echo '<center><font face="Verdana" size="2" color="blue"><u>' .$thedate. '</center></u></font>';
?>

<font face="Verdana" size="2"><?php echo GetGuide(); ?></font>

<center><font face="Verdana" size="2"><?php echo $GLOBALS["Advert03"]; ?></font></center>
<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide.php">Back</b></font></a>

</td></tr>
</table>
<hr>

<?php include 'Include/Footer.php'; Log_Hit("TvGuide-sabc3"); ?>


this is etv
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';

function GetGuide() {
$url = "http://mysite.com";
$RawData = @file_get_contents($url) or die('Could not access file: $url');
$Table = ExData($RawData,'<div style="font-size:12px; padding-top:15px; padding-left:9px">',"</div>");

$FGuide = $Table[5];

$i=2;
$upper = 60;

while ($i <= $upper) {
$FGuide = str_replace($i, '<font face="Verdana" color="red" size="2">' . $i . '</font>', $FGuide);
$i++;
}
$FGuide = str_replace('0', '<font face="Verdana" color="red" size="2">0</font>', $FGuide);
$FGuide = str_replace(1, '<font face="Verdana" color="red" size="2">1</font>', $FGuide);
$FGuide = str_replace(':', '<font face="Verdana" color="green" size="2">:</font>', $FGuide);

return $FGuide;

}

function ExData($text, $openingMarker, $closingMarker) {
$openingMarkerLength = strlen($openingMarker);
$closingMarkerLength = strlen($closingMarker);
$result = array();
$position = 0;
while (($position = strpos($text, $openingMarker, $position)) !== false) {
$position += $openingMarkerLength;
if (($closingMarkerPosition = strpos($text, $closingMarker, $position)) !== false) {
$result[] = substr($text, $position, $closingMarkerPosition - $position);
$position = $closingMarkerPosition + $closingMarkerLength;
}
}
return $result;
}
?>
<div class="hd2"><center><font color=#666666><strong><img src="Images/tvguide/etv.jpg"></strong></font></center></div>

<?
// Prints the date
$thedate = date('l dS F Y');
echo '<center><font face="Verdana" size="2" color="blue"><u>' .$thedate. '</center></u></font>';
?>

<font face="Verdana" size="2"><?php echo GetGuide(); ?></font>

<center><font face="Verdana" size="2"><?php echo $GLOBALS["Advert03"]; ?></font></center>
<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide.php">Back</b></font></a>

</td></tr>
</table>
<hr>

<?php include 'Include/Footer.php'; Log_Hit("TvGuide-etv"); ?>

and this is mnet
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';

function GetGuide() {
$url = "http://mysite.com";
$RawData = @file_get_contents($url) or die('Could not access file: $url');
$Table = ExData($RawData,'<div style="font-size:12px; padding-top:15px; padding-left:9px">',"</div>");

$FGuide = $Table[1];
$i=2;
$upper = 60;

while ($i <= $upper) {
$FGuide = str_replace($i, '<font face="Verdana" color="red" size="2">' . $i . '</font>', $FGuide);
$i++;
}
$FGuide = str_replace('0', '<font face="Verdana" color="red" size="2">0</font>', $FGuide);
$FGuide = str_replace(1, '<font face="Verdana" color="red" size="2">1</font>', $FGuide);
$FGuide = str_replace(':', '<font face="Verdana" color="green" size="2">:</font>', $FGuide);

return $FGuide;
}

function ExData($text, $openingMarker, $closingMarker) {
$openingMarkerLength = strlen($openingMarker);
$closingMarkerLength = strlen($closingMarker);
$result = array();
$position = 0;
while (($position = strpos($text, $openingMarker

Other forums