i am learnin to build wap/websites i have recently got a server to host on, have done the databsae part fine but have been told by the server support team that i have a missing file from my script. the file which is missin is called blocked.php, i have been lookin on the net for hours on how to fix but cant find much so if any 1 out there could help me out with this it would be much appreciated thanksss
can any one help please
Started on the old forum in September 2009 · view the original in the archive · old links redirect here
blocked.php
<?php
$mobile = "blocked2.php";
$text = $_SERVER['HTTP_USER_AGENT'];
$var[0] = 'J2ME';
$var[1] = 'Opera Mini246/';
$var[2] = 'anonymouse.org';
$var[3] = 'Mozilla/4.0 (compatible; MSIE 6.0; Symbian OS; Series 60';
$var[4] = 'http://www.verkata.com';
$result = count($var);
for ($i=0;$i<$result;$i++)
{
$ausg = stristr($text, $var[$i]);
if(strlen($ausg)>0)
{
header("location: $mobile");
echo '<BR>java/opera mini browser detected<BR>';
break;
}
}
?>
blocked2.php
<?php
/*
www.wapdesire.com
*/
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
//header('Content-type: application/vnd.wap.xhtml+xml');
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
echo "<head>";
echo "<title>Error!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<img src=\"../images/notok.gif\" alt=\"\"/><br/>";
echo "<b>Error!!! Login Failed...</b><br/><br/>";
echo "This error happens usually when Using java/opera mini or another blocked browser<br/><br/>";
echo "<b>pls use ur mobiles main browser</b>";
echo "</p>";
echo "</body>";
echo "</html>";
?>
Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code
NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH
blocked.php script is a load of rubbish ..... why would you want to stop people from visiting your site? better off making a blank blocked.php script 🙂
nige do what someone else said create a blocked.php file but leave it blank
Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code
NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH
what error message does it say?
if its blank put this at the top of page:
error_reporting (E_ALL); ini_set ('display_errors', true);
after <?php 🙂
have tryed that but still no luck but thank you anyways these are the errors from the login page
Warning: include(../blocked.php) [function.include]: failed to open stream: No such file or directory in /home8/thewappu/public_html/web/index.php on line 2
Warning: include() [function.include]: Failed opening '../blocked.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home8/thewappu/public_html/web/index.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at /home8/thewappu/public_html/web/index.php:2) in /home8/thewappu/public_html/web/index.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at /home8/thewappu/public_html/web/index.php:2) in /home8/thewappu/public_html/web/index.php on line 6
im geting even more after i log in also
line 5 and 6 sounds a problem aswell if you put // at the start of thoose lines it might get rid of thoose errors 🙂