Q&A: DOES THIS SCRIPT HAVE TO DO WITH THE SITEHEADER?

Question by killamike513:
does this script have to do with the siteheader?
include("funcs.php");
function doswitch (){
global $ tab, $ time, $ id, $ tru;
$ pimp = mysql_fetch_array(mysql_query("SELECT code FROM $ tab[pimp] WHERE id='$ id';"));
$ user = mysql_fetch_array(mysql_query("SELECT username FROM $ tab[user] WHERE code='$ pimp[0]';"));
$ getgames = mysql_query("SELECT round FROM $ tab[game] WHERE starts<$ time AND ends>$ time ORDER BY round ASC;”);
while ($ game = mysql_fetch_array($ getgames))
{
if(fetch(“SELECT user FROM $ tab[stat] WHERE user=’$ user[0]‘ AND round=’$ game[0]‘;”)){
?>}?>Round =$ game[0]?>}?>,
}
}
}
function ADMINHEADER ($ title){
global $ tab, $ tru, $ id;
$ pimp = mysql_fetch_array(mysql_query("SELECT status FROM $ tab[pimp] WHERE id='$ id';"));
if($ pimp[0] != admin){ echo"
header(“Cache-Control: no-cache, must-revalidate”);
Header(“Pragma: no-cache”);
Header(“Expires: Thu, 01 Jan 1970 00:00:00 GMT”);
?>
0){?>onLoad=”settimes()”}?>>
}
function GAMEHEADER ($ title){
global $ tab, $ site, $ id, $ time, $ masteraccount, $ tru;
$ boot = mysql_fetch_array(mysql_query("SELECT online,status,pimp,crew,newalert,alert,rank,nrank,networth,msg,atk,ivt FROM $ tab[pimp] WHERE id='$ id';"));
$ crw = mysql_fetch_array(mysql_query("SELECT name,founder,icon FROM $ tab[crew] WHERE id='$ boot[3]';"));
$ idle=$ time-$ boot[0];
if (!$ boot){ header("Location: ../play.php?msg=select"); }
elseif ($ idle > 3600){ header(“Location: ../play.php?msg=idle”); }
elseif ($ boot[1] == banned){ header(“Location: ../play.php?msg=disabled”); }
$ protection = mysql_fetch_array(mysql_query(“SELECT protection,protectstarted FROM $ tab[pimp] WHERE id=’$ id’;”));
$ protect=$ protection[0]+$ protection[1]-$ time;
if($ protect < 0){$ protect=0;}
header("Cache-Control: no-cache, must-revalidate");
Header("Pragma: no-cache");
Header("Expires: Thu, 01 Jan 1970 00:00:00 GMT");
?>
0){?>onLoad=”settimes()”}?>>
|
|
|
“>produce • “>travel • “>ranks “>find crew • “>crew ranks • |
|
|
}
function GAMEFOOTER (){ $ pimp = mysql_fetch_array(mysql_query("SELECT pimp FROM $ tab[pimp] WHERE id='$ id';")); |
|
|
“>recuiting board • &tru==$ tru?>“>my profile • game guide • game rules • “>logout |
|
| copyright © 2004 domain. all rights reserved |
}
?>
——————————————
Answer by byteofk
This bit does:
header(“Cache-Control: no-cache, must-revalidate”);
Header(“Pragma: no-cache”);
Header(“Expires: Thu, 01 Jan 1970 00:00:00 GMT”);
Although this is probably what is triggering the error, not what is causing it.
Somewhere before that you are echoing or printing data to the page and then when it wants to begin the page with this header it errors out. Common PHP beginners error.
Instead of echoing output, store it in a variable and output it right at the end. Nice and safe that way.
——————————————
Add your own answer in the comments!









about 2 years ago
Just join a proxy network like Mavis P2P Proxy or Tor and use a proxy server to browse and click on ads that interest you on your own website. Just make sure your Click Thru Rate is not over 0.5%. You can easily make $100/per day doing this. Good luck!
Proxy Networks:
http://www.mavis.com
https://www.torproject.org/
about 2 years ago
Here are the tips about using Google Adsense..
http://hubpages.com/_yaans/hub/100-Google-AdSense-Tips