can any one help please

Started on the old forum in September 2009 · view the original in the archive · old links redirect here

11 replies · 519 views · started 17 years ago · 1 min read

3 participants
nige Newbie · 9 posts #1

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

riderz Lead · 975 posts #2

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

something else Fellow · 2,296 posts #3

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 Newbie · 9 posts #4

have been told by my server suppoort that my scripts missin the blocked.php thats why im geting errors

nige Newbie · 9 posts #5

thank you very much mate !!!!

nige Newbie · 9 posts #6

riderz will i have to change any of the code to my site details?

riderz Lead · 975 posts #7

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

nige Newbie · 9 posts #8

thanks for all the help riderz but i got some bad news i have tryed both things you have said but nither of them are working. you got any more ideas?

something else Fellow · 2,296 posts #9

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 🙂

nige Newbie · 9 posts #10

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

something else Fellow · 2,296 posts #11

put blocked.php into main folder not /web/ folder 🙂

something else Fellow · 2,296 posts #12

line 5 and 6 sounds a problem aswell if you put // at the start of thoose lines it might get rid of thoose errors 🙂

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close