Announcement

Collapse
No announcement yet.

script for myspace page that will block a certain IP address (was Hope this is the ri

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

  • script for myspace page that will block a certain IP address (was Hope this is the ri

    I'm in need of a script that I can place in my myspace page that will block a certain IP address. Can anyone here please give me some help? Thanks in advance.
    Last edited by confusedsouthernchick; 29th May 2008, 20:59.

  • #2
    Re: Hope this is the right place

    confusedsouthernchick,

    You might want to look into changing your title to something more appropriate and I'm also not too sure how many replies your going to get based on your question, but good luck anyway

    Michael
    Michael Armstrong
    www.m80arm.co.uk
    MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

    Comment


    • #3
      Re: script for myspace page that will block a certain IP address (was Hope this is th

      Code:
      <script type="text/javascript">
      
      // Block IP address script- By JavaScriptKit.com (http://www.javascriptkit.com)
      // For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
      // This notice must stay intact for use.
      
      //Enter list of banned ips, each separated with a comma:
      var bannedips=["23.23.23.23", "11.11.11.11"]
      
      var ip = '<!--#echo var="REMOTE_ADDR"-->'
      
      var handleips=bannedips.join("|")
      handleips=new RegExp(handleips, "i")
      
      if (ip.search(handleips)!=-1){ 
      alert("Your IP has been banned from this site. Redirecting...")
      window.location.replace("http://www.google.com")
      }
      
      </script>
      source (googled): http://www.javascriptkit.com/script/.../blockip.shtml
      Last edited by Rems; 29th May 2008, 21:18.

      This posting is provided "AS IS" with no warranties, and confers no rights.

      __________________

      ** Remember to give credit where credit's due **
      and leave Reputation Points for meaningful posts

      Comment


      • #4
        Re: script for myspace page that will block a certain IP address (was Hope this is th

        wow thanks for the script. I'm hoping I know exactly where to put the IP address

        Comment


        • #5
          Re: script for myspace page that will block a certain IP address (was Hope this is th

          hmmm for some reason the script is actually showing on my page I copied it exactly like it was posted..

          Comment


          • #6
            Re: script for myspace page that will block a certain IP address (was Hope this is th

            Originally posted by confusedsouthernchick View Post
            I'm in need of a script that I can place in my myspace page that will block a certain IP address. Can anyone here please give me some help? Thanks in advance.
            Not possible, script's to block certain IP adresses must be run server-side (i.o.w. run on te server), an blocking script running client-side (i.o.w. incorperated on youre page) can be eliminated within 10 sec's

            Comment


            • #7
              Re: script for myspace page that will block a certain IP address (was Hope this is th

              Originally posted by Rems View Post
              Code:
              <script type="text/javascript">
              
              // Block IP address script- By JavaScriptKit.com (http://www.javascriptkit.com)
              // For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
              // This notice must stay intact for use.
              
              //Enter list of banned ips, each separated with a comma:
              var bannedips=["23.23.23.23", "11.11.11.11"]
              
              var ip = '<!--#echo var="REMOTE_ADDR"-->'
              
              var handleips=bannedips.join("|")
              handleips=new RegExp(handleips, "i")
              
              if (ip.search(handleips)!=-1){ 
              alert("Your IP has been banned from this site. Redirecting...")
              window.location.replace("http://www.google.com")
              }
              
              </script>
              source (googled): http://www.javascriptkit.com/script/.../blockip.shtml

              this is useless when the blocked person uses firefox with javascipt disabled

              Comment


              • #8
                Re: script for myspace page that will block a certain IP address (was Hope this is th

                Scripts must be added to the code of the page, you cannot add scripts to text content on your page.
                I am not familiar with MySpace but I think that users can not add additional code to their pages.


                an blocking script running client-side (i.o.w. incorperated on youre page) can be eliminated
                that is right!


                \Rems
                Last edited by Rems; 29th May 2008, 22:18.

                This posting is provided "AS IS" with no warranties, and confers no rights.

                __________________

                ** Remember to give credit where credit's due **
                and leave Reputation Points for meaningful posts

                Comment


                • #9
                  Re: script for myspace page that will block a certain IP address (was Hope this is th

                  Originally posted by Rems View Post
                  Scripts must be added to the code of the page, you cannot add scripts to text content on your page.
                  I am not familiar with MySpace but I think that users can not add additional code to their pages.

                  \Rems
                  I don't think so either, would be quite an big security leak.

                  Best course of action would be to contact MySpace and file an complaint about this user (or IP adress).

                  Comment


                  • #10
                    Re: script for myspace page that will block a certain IP address (was Hope this is th

                    I don't know what kind of access you have with myspace but can't you simply add a .htaccess file on the root of you're website?

                    http://www.javascriptkit.com/howto/htaccess5.shtml

                    Oh or this might help?
                    http://answers.yahoo.com/question/in...6212321AAJxICZ
                    Marcel
                    Technical Consultant
                    Netherlands
                    http://www.phetios.com
                    http://blog.nessus.nl

                    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
                    "No matter how secure, there is always the human factor."

                    "Enjoy life today, tomorrow may never come."
                    "If you're going through hell, keep going. ~Winston Churchill"

                    Comment

                    Working...
                    X