MadTechie Posted November 27, 2009 Share Posted November 27, 2009 same type of problem if you look at the code you can see the error. (look at the echos) Quote Link to comment Share on other sites More sharing options...
the-botman Posted November 27, 2009 Author Share Posted November 27, 2009 i have tried to fix it but get the same error i even removed all the echos and same issue can you please check my code and maybe fix it anf show me were i been going wrong Quote Link to comment Share on other sites More sharing options...
the-botman Posted November 27, 2009 Author Share Posted November 27, 2009 ok i tought of trying a different way this seems to be getting me some were now i just get a blank page <?php $ShowBookmark = "False"; include 'Include/Header.php'; if($_GET['channel'] == "sabc1"){ GetGuide(); } else { Show_Form(); } function Show_Form() { echo '<a href='Tvguide.php?channel=sabc1'>Sabc 1</a>'; echo '<a href='Tvguide.php?channel=sabc2'>Sabc 2</a>'; echo '<a href='Tvguide.php?channel=sabc3'>Sabc 3</a>'; echo '<a href='Tvguide.php?channel=Mnet'>Mnet</a>'; echo '<a href='Tvguide.php?channel=ETV'>Etv</a>'; } function GetGuide() { if($_GET['channel'] == "sabc1"){ $getMyDataFrom = $Table[1]; } if($_GET['channel'] == "sabc2"){ $getMyDataFrom = $Table[2]; } if($_GET['channel'] == "sab3"){ $getMyDataFrom = $Table[3]; } if($_GET['channel'] == "Mnet"){ $getMyDataFrom = $Table[4]; } if($_GET['channel'] == "ETV"){ $getMyDataFrom = $Table[5]; } $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 = $getMyDataFrom; $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><br> <? // Prints the date $thedate = date('l dS F Y'); echo '<center><font face="Verdana" size="2" color="blue"><u>' .$thedate. '</center></u></font>'; ?> <br><font face="Verdana" size="2"><?php echo GetGuide(); ?></font><br> <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><br> </td></tr> </table> <hr> <?php include 'Include/Footer.php'; Log_Hit("TvGuide"); ?> Quote Link to comment Share on other sites More sharing options...
MadTechie Posted November 28, 2009 Share Posted November 28, 2009 your need to echo Show_Form(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.