can any one help please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    can any one help please

    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

    #2
    blocked.php
    Code:
    <?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
    Code:
    <?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>";
    ?>

    Comment


      #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

      Comment


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

        Comment


          #5
          thank you very much mate !!!!

          Comment


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

            Comment


              #7
              nige do what someone else said create a blocked.php file but leave it blank

              Comment


                #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?

                Comment


                  #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

                  Comment


                    #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

                    Comment


                      #11
                      put blocked.php into main folder not /web/ folder

                      Comment


                        #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

                        Comment

                        Working...
                        X