Browser

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

    Browser

    how to ban browser with the scrip mobilechat wml ? pls help

    #2
    if you want to ban all ppl using a particular browser.

    lets say opera for example:

    you can do this. go to ipban.php in tools folder.

    and then add this to the file.
    PHP Code:
    $browser explode ('/'$_SERVER['HTTP_USER_AGENT']);
    if(
    $browser[0] == "Opera")
    {
    echo 
    '<meta http-equiv="Refresh" content="0; url=../tools/yourbanned.php">';

    this will ban all people using opera browsers

    what the code does:
    it grabs the users browser information. breaks it down into an array of words.
    looks for the word opera in the array and sees if it matches begining of browser info. if true
    it redirects them to the yourbanned page.

    im not sure if it will interfere with the existing ipban there as the ipban looks for both an ip AND browser before banning

    so it should be fine to run both side by side. if not just commented out the old code unless you really need it.
    <?php
    include ('Ghost');
    if ($Post == true) {
    echo '

    sigpic
    alt='coding-talk.com!!' />';
    echo 'Sharing Is Caring!';
    } else {
    echo '

    alt='the username GHOST has been comprimised!' />';
    echo 'OMG SOMEBODY HELP ME!!';
    }
    ?>

    Comment


      #3
      what type of a code do you need ? Doing with sql or just with php array?

      Comment


        #4
        Originally posted by $XTREME$ View Post
        what type of a code do you need ? Doing with sql or just with php array?
        if you knew anything about the scripts that gets posted here. you would know "mobilechat wml" is a flatfile script and created/maintained by me.

        he has the correct answer posted above. its upto him now whether he uses it or not.
        <?php
        include ('Ghost');
        if ($Post == true) {
        echo '

        sigpic
        alt='coding-talk.com!!' />';
        echo 'Sharing Is Caring!';
        } else {
        echo '

        alt='the username GHOST has been comprimised!' />';
        echo 'OMG SOMEBODY HELP ME!!';
        }
        ?>

        Comment


          #5
          thanks my master. its nice code 4me bro, the code can ban browser if i use ftp on9 , do u can display, how to ban browser in chat, example , banbrowser/browser user , lyk ban/ghost or kick/ghost
          Last edited by weet2012; 28.07.12, 01:35.

          Comment


            #6
            would be a silly move to have a fully working tool like that cos a browser banner doesnt just ban 1 single person. it bans thousands maybe millions of ppl that use that particular browser.

            so if you made a tool like that, where you can ban every browser on the whim of a command,
            and the list looked like

            Opera
            Mozilla
            Safari
            Chrome
            Nokia6110
            N95
            etc etc

            you wouldnt any visitors at all. you could however just simple add more names to that function yourself that i posted earlier.

            like
            if browser[0] == 'Opera' OR browser[0] == 'Safari' OR browser[0] == 'Mozilla'
            you could possibly use delimiters too like
            if browser[0] == 'Opera' || browser[0] == 'Safari' || browser[0] == 'Mozilla'
            etc etc i think, im sure thats like another way of saying OR

            this isnt trying to move away from the original answer. can it be made.
            yes it can be made by modding a "couple" of files. but i wouldnt recommend a browser ban tool.
            i dont even recommend using the earlier post or even the original ipban tool that exists.
            Because i dont believe in them. tools like this are dodgey. as many many ppl share the same ip address or use same browsers
            <?php
            include ('Ghost');
            if ($Post == true) {
            echo '

            sigpic
            alt='coding-talk.com!!' />';
            echo 'Sharing Is Caring!';
            } else {
            echo '

            alt='the username GHOST has been comprimised!' />';
            echo 'OMG SOMEBODY HELP ME!!';
            }
            ?>

            Comment


              #7
              what you think about this code
              PHP Code:
              <?php
              $br 
              $_SERVER['HTTP_USER_AGENT'];
              $blocked "Nokia6600"// Browser name

              if (ereg($blocked,$br))
              {
              echo 
              "You Have Been Banned Reason (Your Reason Here) Contact Owner";
              exit();
              }
              ?>
              Last edited by ajit55u; 28.07.12, 05:29.
              They Make Rules & I Break Them

              Comment


                #8
                Originally posted by ajit55u View Post
                what you think about this code
                PHP Code:
                <?php
                $br 
                $_SERVER['HTTP_USER_AGENT'];
                $blocked "Nokia6600"// Browser name

                if (ereg($blocked,$br))
                {
                echo 
                "You Have Been Banned Reason (Your Reason Here) Contact Owner";
                exit();
                }
                ?>
                whats really the difference between them?
                apart from the fact my way is a little shorter in code.

                also you can make your code shorter. by putting the echo inside your exit like::
                exit("You Have Been Banned Reason (Your Reason Here) Contact Owner");

                Edited:
                i should have also noted. as your code is now. the user would be stuck on the page. with no link to go anywhere.
                you should either add a link. or a redirect like i did so the user goes somewhere after being told your banned.
                (just a solution)

                Edited Again:
                sorry to be the bearer of bad new.
                ereg::
                Warning
                This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.
                PHP: ereg - Manual

                Added after 11 minutes:

                Originally posted by ajit55u
                thanks alot for your post Ghost
                your welcome. sorry about the ereg function being/getting deprecated.
                you can always use the code above i posted it does the same thing. you just need to mod the url pointer to point to maybe your index.php
                and slap in an exit("youve been banned); "underneath" the meta tag.

                so it looks like this::
                PHP Code:
                $browser explode ('/'$_SERVER['HTTP_USER_AGENT']); 
                if(
                $browser[0] == "Opera"

                echo 
                '<meta http-equiv="Refresh" content="0; url=index.php">'
                exit(
                "You Have Been Banned Reason (Your Reason Here) Contact Owner");
                }
                //
                //
                // 
                and you have yourself a undeprecated version
                hope this is a solution for you.
                Last edited by Ghost; 28.07.12, 06:12.
                <?php
                include ('Ghost');
                if ($Post == true) {
                echo '

                sigpic
                alt='coding-talk.com!!' />';
                echo 'Sharing Is Caring!';
                } else {
                echo '

                alt='the username GHOST has been comprimised!' />';
                echo 'OMG SOMEBODY HELP ME!!';
                }
                ?>

                Comment


                  #9
                  thank you so much again for the code & explanation ghost
                  They Make Rules & I Break Them

                  Comment


                    #10
                    Originally posted by ajit55u View Post
                    thank you so much again for the code & explanation ghost
                    no problem happy to help.
                    <?php
                    include ('Ghost');
                    if ($Post == true) {
                    echo '

                    sigpic
                    alt='coding-talk.com!!' />';
                    echo 'Sharing Is Caring!';
                    } else {
                    echo '

                    alt='the username GHOST has been comprimised!' />';
                    echo 'OMG SOMEBODY HELP ME!!';
                    }
                    ?>

                    Comment


                      #11
                      hmm / dat nice ! deal but How to ban user whos those used proxy browser ?

                      hmm / dat nice ! deal,,,but How to ban user whos those used proxy browser ?

                      Comment

                      Working...
                      X