-CrAzY- Posted September 6, 2007 Share Posted September 6, 2007 I Tryed This: $auto = (int)rand(1, 2); if ($auto == 1) { [img=banners/1.jpg]; } if ($auto == 2) { [img=banners/2.jpg]; } EOF; $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { in login.php But It Just Shows Two Banners And Some Writing ( if ($auto == 2) .. Etc. ) Can Someone Help Quote Link to comment Share on other sites More sharing options...
-Matt- Posted September 6, 2007 Share Posted September 6, 2007 Re: Random Banner On Login.php cool Quote Link to comment Share on other sites More sharing options...
hamster01 Posted September 6, 2007 Share Posted September 6, 2007 Re: Random Banner On Login.php Use this: <?php $RandomRumber = rand(1,2); echo '[img=banner' . $RandomNumber . '.jpg]'; ?> Edit: Could help if I mentioned an extension. Quote Link to comment Share on other sites More sharing options...
seanybob Posted September 6, 2007 Share Posted September 6, 2007 Re: Random Banner On Login.php <body onload="getme();">EOF; $auto = (int)rand(1, 2); if ($auto == 1) { print"[img=banners/1.jpg]"; } if ($auto == 2) { print"[img=banners/2.jpg]"; } $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { beat me to it again... v,v Quote Link to comment Share on other sites More sharing options...
-Matt- Posted September 6, 2007 Share Posted September 6, 2007 Re: Random Banner On Login.php seany how does your head store so many codes? Quote Link to comment Share on other sites More sharing options...
-CrAzY- Posted September 6, 2007 Author Share Posted September 6, 2007 Re: Random Banner On Login.php </style> </head> <body onload="getme();">EOF; $auto = (int)rand(1, 2); if ($auto == 1) { print"[img=banners/1.jpg]"; } if ($auto == 2) { print"[img=banners/2.jpg]"; } $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) {die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this. If you feel this is unfair please contact the Admin! </font>[/b]</body></html>"); } = Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/imgame/public_html/login.php on line 143 Please Help Quote Link to comment Share on other sites More sharing options...
Absolute Zero Posted September 6, 2007 Share Posted September 6, 2007 Re: Random Banner On Login.php only 23 lines in the code given, please post all of your login.php Quote Link to comment Share on other sites More sharing options...
hamster01 Posted September 6, 2007 Share Posted September 6, 2007 Re: Random Banner On Login.php Try this: </style> </head> <body onload="getme();"> EOF; $auto = rand(1,2); if ($auto == 1) echo "[img=banners/1.jpg]"; else echo "[img=banners/2.jpg]"; $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) {die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this. If you feel this is unfair please contact the Admin! </font>[/b]</body></html>"); } Edit: I think it may have been the heredoc function. 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.