I have this php script:
It works and everything but when it comes to finishing running the php side the rest of HTML doesn't load.
Look at http://thewebmasterstool.com/prcheck.php?url=http://www.computer-forums.be/
to see what I mean
Thank you
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>The Webmasters Tool - Google PageRank Check</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php
include "metatag.php";
?>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="641" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="674"><table width="641" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="51" ><img src="images/tl_header.gif" alt="-" width="51" height="36" /></td>
<td class="headertop" width="543"></td>
<td width="47"><img src="images/tr_header.gif" alt="-" width="47" height="36" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="images/header.gif" alt="header" width="641" height="145" /></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" class="randbannerbg"> <div align="center">
<?php
include ("randbanner.php");
?>
</div></td>
</tr>
<tr>
<td colspan="3"><div align="center" class="randbannerbg"><a href="advertise.php">Advertise
Here</a></div></td>
</tr>
<tr>
<td style="background: url(images/b_header_bg.gif)" width="99"><img src="images/bl_header.gif" alt="-" width="99" height="35" /></td>
<td style="background: url(images/b_header_bg.gif)" width="436"></td>
<td style="background: url(images/b_header_bg.gif)" width="106"><img src="images/br_header.gif" alt="-" width="106" height="35" /></td>
</tr>
</table></td>
</tr>
</table>
<table width="641" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="185" valign="top"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/pipe_bg.gif" alt="-" width="28" height="5" /></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="lcum">
<tr>
<td style="background: url(images/left_column_header_top.gif)" width="179" height="35"><div align="center">Main
Navigation</div></td>
</tr>
<tr>
<td><div align="right"><img src="images/left_column_2box.gif" width="176" height="25" alt="" /></div></td>
</tr>
<tr>
<td class="lcolumnt" height="17">
<?php
include "nav.php";
?>
</td>
</tr>
<tr>
<td height="17"><div align="right"><img src="images/lcolumn_bottom.gif" alt="-" width="176" height="30" /></div></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/pipe_bg.gif" alt="" width="28" height="5" /></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="lcum">
<tr>
<td style="background: url(images/left_column_header_top.gif)" width="179" height="35"><div align="center">Please
Vote!</div></td>
</tr>
<tr>
<td><div align="right"><img src="images/left_column_2box.gif" width="176" height="25" alt="" /></div></td>
</tr>
<tr>
<td class="lcolumnt"> <table width="84%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="9%"></td>
<td width="91%">
<?php
include ("poll.php");
?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="17"><div align="right"><img src="images/lcolumn_bottom.gif" alt="-" width="176" height="30" /></div></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="lcum">
<tr>
<td style="background: url(images/left_column_header_top.gif)" width="179" height="35"><div align="center">Affiliates</div></td>
</tr>
<tr>
<td><div align="right"><img src="images/left_column_2box.gif" width="176" height="25" alt="" /></div></td>
</tr>
<tr>
<td class="lcolumnt"> <table width="84%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="9%"></td>
<td width="91%">
<?php
include ("randlink.php");
?>
</td>
</tr>
<tr>
<td></td>
<td><a href="advertise.php">Advertise Here</a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="17"><div align="right"><img src="images/lcolumn_bottom.gif" alt="-" width="176" height="30" /><br />
</div></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/pipe_bg.gif" alt="-" width="28" height="5" /></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="lcum">
<tr>
<td style="background: url(images/left_column_header_top.gif)" width="179" height="35"><div align="center">Google
Adsense </div></td>
</tr>
<tr>
<td><div align="right"><img src="images/left_column_2box.gif" width="176" height="25" alt="" /></div></td>
</tr>
<tr>
<td class="lcolumnt"> <table width="84%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="9%"></td>
<td width="91%"></td>
</tr>
</table>
<div align="center"><?php
include ("adsense.php");
?>
</div></td>
</tr>
<tr>
<td height="17"><div align="right"><img src="images/lcolumn_bottom.gif" alt="-" width="176" height="30" /><br />
</div></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="lcum">
<tr>
<td style="background: url(images/left_column_header_top.gif)" width="179" height="35"><div align="center">Website
Statistics</div></td>
</tr>
<tr>
<td><div align="right"><img src="images/left_column_2box.gif" width="176" height="25" alt="" /></div></td>
</tr>
<tr>
<td class="lcolumnt"> <table width="84%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="9%"></td>
<td width="91%"><table width="100%" border="0" cellspacing="2" cellpadding="0">
<?php
include"stats.php";
?>
<tr>
<?php
include 'config.php';
mysql_connect("$host", "$user", "$pass") or die(mysql_error());
mysql_select_db("$dbname") or die(mysql_error());
function update_sessions()
{
include 'config.php';
mysql_connect("$host", "$user", "$pass") or die(mysql_error());
mysql_select_db("$dbname") or die(mysql_error());
$sid = session_id();
if($_SESSION['sitename_online'] == "1")
{
mysql_query("UPDATE `sessions` SET `time` = '". time() ."' WHERE `sid` = '$sid'") or die(mysql_error());
}
else
{
$_SESSION['sitename_online'] = 1;
mysql_query("INSERT INTO `sessions` SET `time` = '". time() ."', `sid` = '$sid'") or die(mysql_error());
}
}
function get_onlineusers()
{
$min = time() - 121;
mysql_query("DELETE FROM `sessions` WHERE `time` <= '$min'") or die(mysql_error());
$query = mysql_query("SELECT COUNT(sid) FROM `sessions`");
$num = mysql_fetch_row($query);
return($num[0]);
}
update_sessions();
$online_users = get_onlineusers();
echo("<td>Online:</td><td bgcolor='#F4F4F4'>$online_users</td>");
?>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="17"><div align="right"><img src="images/lcolumn_bottom.gif" alt="-" width="176" height="30" /><br />
<img src="images/pipes_end_lcolumn.gif" width="176" height="14" alt="" /></div></td>
</tr>
</table></td>
<td width="456" valign="top" class="mctop"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/pipes_maincontent.gif" alt="-" width="452" height="6" /></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mcbg">
<tr>
<td width="452" height="32" class="contentheader"><div align="center">Main
Content</div></td>
</tr>
<tr>
<td><img src="images/main_content_header_under.gif" width="452" height="26" alt="" /></td>
</tr>
<tr>
<td class="mctop"><table width="94%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="5%"></td>
<td width="95%"><table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td> <div align="center"><?php
error_reporting(0);
@include_once 'getpr.php';
if (!class_exists('PageRankXor32')) {
echo '<h2>Error: Unable to load getpr.php</h2>';
exit;
}
if (isset($_GET['url'])) {
$oPR=new PageRankXor32();
ReportStart($isCSV);
$aUrl=explode("\n",$_GET['url']);
//Step thru array of urls
foreach ($aUrl as $Url) {
//Trim off any whitespace
$Url=trim($Url);
//Ignore blank lines
if ($Url!='') {
if (isUrlValid($Url)) {
$PageRank=$oPR->getRank($Url);
++$UrlCount;
} else {
$PageRank=$BadUrlText;
}
ReportLine($Url,$PageRank,$isCSV);
}
//Limit the number of urls allowed
if ($UrlCount >= $MaxUrls) {
break;
}
}
ReportEnd($isCSV);
}
function isUrlValid($Url) {
return (strpos(strtolower($Url),'http://')===0);
}
function ReportStart($isCSV=FALSE) {
if ($isCSV) {
echo '<pre>';
} else {
echo $GLOBALS['TableStart'];
}
}
function ReportLine($Url,$PageRank,$isCSV=FALSE) {
if ($isCSV) {
$Quote=is_numeric($PageRank) ? '' : '"';
echo '"'.htmlspecialchars($Url).'",'.$Quote.$PageRank.$Quote."\n";
} else {
$rank = $PageRank;
echo '<a href=http://'.$_GET['url'].'>'.$_GET['url'].'</a> has a PR of: '.$rank.'<br /> ';
echo "Place an image on your site that will automatically update when your site's PR update.<br /><br />";
echo "<img src=\"primage.php?site=".$_GET['url']."\" width=\"62\" height=\"21\" alt=\"\"> <br /><br />";
echo "<input type=\"text\" size=\"75\" value=\"http://www.thewebmasterstool.com/primage.php?site=".$_GET['url']."\"> <br /><br />";
echo "<img src=\"primagewhite.php?site=".$_GET['url']."\" width=\"145\" height=\"65\" alt=\"\"> <br /><br />";
echo "<input type=\"text\" size=\"75\" value=\"http://www.thewebmasterstool.com/primagewhite.php?site=".$_GET['url']."\">";
}
}
?>
</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td class="mctop"><img src="images/mc_box_bottom.gif" alt="-" width="452" height="23" /></td>
</tr>
</table>
<div align="center"> <img src="images/copyright_DO_NOT_STEAL_ELSE_LEGAL_ACTION.gif" alt="Free Templates" width="422" height="15" border="0" />
</div></td>
</tr>
<tr>
<td colspan="2" valign="top"> <p align="center">
<?php
include ("bottom.php");
?>
</p></td>
</tr>
</table>
</body>
</html>
It works and everything but when it comes to finishing running the php side the rest of HTML doesn't load.
Look at http://thewebmasterstool.com/prcheck.php?url=http://www.computer-forums.be/
to see what I mean
Thank you






