How to disable right click and ctrl+c use in a web page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Amar

    How to disable right click and ctrl+c use in a web page

    Hi All,

    I am a newbie to PHP and have the task to create a page using PHP where
    in that page I need to disable all key operation as well as mouse
    operation even also the menu operation that means printscreen. I have
    only the java script code for mouse right click disable but that does
    not allow me to disable to do ctrl+c. So I need some help that can
    solve my task. Waiting for your replies.

    Thanks,
    Amar

  • Jeff North

    #2
    Re: How to disable right click and ctrl+c use in a web page

    On 20 Dec 2006 06:55:02 -0800, in comp.lang.php "Amar"
    <ghungur.2006@g mail.com>
    <1166626502.123 605.304920@80g2 000cwy.googlegr oups.comwrote:
    >| Hi All,
    >|
    >| I am a newbie to PHP and have the task to create a page using PHP where
    >| in that page I need to disable all key operation as well as mouse
    >| operation even also the menu operation that means printscreen. I have
    >| only the java script code for mouse right click disable but that does
    >| not allow me to disable to do ctrl+c. So I need some help that can
    >| solve my task. Waiting for your replies.
    What you are wanting to do is to control the operating systems
    functionality from within a browser therefore it is not doable.

    The javascript right mouse click is easily circumvented also.
    ---------------------------------------------------------------
    jnorthau@yourpa ntsyahoo.com.au : Remove your pants to reply
    ---------------------------------------------------------------

    Comment

    • no@emails.thx

      #3
      Re: How to disable right click and ctrl+c use in a web page

      On 20 Dec 2006 06:55:02 -0800, "Amar" <ghungur.2006@g mail.comwrote:
      >I am a newbie to PHP and have the task to create a page using PHP where
      >in that page I need to disable all key operation as well as mouse
      >operation even also the menu operation that means printscreen. I have
      >only the java script code for mouse right click disable but that does
      >not allow me to disable to do ctrl+c. So I need some help that can
      >solve my task. Waiting for your replies.
      Hi Amar

      Firstly, PHP is a server-side language and so has no control of the
      client's browser, beyong the HTML and Javascript you send to it.

      If you need total control of the user's environment I would suggest
      you look at creating a Flash or Java applet and put whatever contents
      you need inside that but it won't stop any viewer copying the screen.
      You see many sites that disable the right-click or copy facility but
      this doesn't give anything more than very rudimentary protection of
      the page contents ... remember anyone can look into the browser's
      cache or just simply hit "Print Screen" to copy the whole screen to
      the clipboard.

      Chris R.

      Comment

      • Erwin Moller

        #4
        Re: How to disable right click and ctrl+c use in a web page

        Amar wrote:
        Hi All,
        >
        I am a newbie to PHP and have the task to create a page using PHP where
        in that page I need to disable all key operation as well as mouse
        operation even also the menu operation that means printscreen. I have
        only the java script code for mouse right click disable but that does
        not allow me to disable to do ctrl+c. So I need some help that can
        solve my task. Waiting for your replies.
        >
        Thanks,
        Amar
        Why on Earth would you ever want to create such horrible functionality?

        But luckily it cannot be done.

        Erwin

        Comment

        • Michael Fesser

          #5
          Re: How to disable right click and ctrl+c use in a web page

          ..oO(Amar)
          >I am a newbie to PHP and have the task to create a page using PHP where
          >in that page I need to disable all key operation as well as mouse
          >operation even also the menu operation that means printscreen. I have
          >only the java script code for mouse right click disable but that does
          >not allow me to disable to do ctrl+c. So I need some help that can
          >solve my task. Waiting for your replies.
          Impossible. Don't waste your time with such things, you should do
          something useful instead.

          Micha

          Comment

          • Amar

            #6
            Re: How to disable right click and ctrl+c use in a web page


            Michael Fesser wrote:
            .oO(Amar)
            >
            I am a newbie to PHP and have the task to create a page using PHP where
            in that page I need to disable all key operation as well as mouse
            operation even also the menu operation that means printscreen. I have
            only the java script code for mouse right click disable but that does
            not allow me to disable to do ctrl+c. So I need some help that can
            solve my task. Waiting for your replies.
            >
            Impossible. Don't waste your time with such things, you should do
            something useful instead.
            >
            Micha
            Thanks all for your comments but I have to find such a way that will
            help me to do so. As I had mentioned that I can use javascript for
            mouse button disabling but for key board (ctrl+c and printscreen) I
            need some help. Whatever thanks again for all your suggestions and
            comments if any solutions then please welcome.

            Thank again,
            Amar

            Comment

            • Toby Inkster

              #7
              Re: How to disable right click and ctrl+c use in a web page

              Amar wrote:
              Michael Fesser wrote:
              >Amar wrote:
              >>
              >>I am a newbie to PHP and have the task to create a page using PHP
              >>where in that page I need to disable all key operation as well as
              >>mouse operation even also the menu operation that means printscreen.
              >>
              >Impossible. Don't waste your time with such things, you should do
              >something useful instead.
              >
              Thanks all for your comments but I have to find such a way that will
              help me to do so.
              What part of the word "impossible " did you fail to understand?

              If you don't want people to copy your page, use copyright law. Stop trying
              to find a technical solution to a non-technical problem.

              --
              Toby A Inkster BSc (Hons) ARCS
              Contact Me ~ http://tobyinkster.co.uk/contact

              Comment

              • Rik

                #8
                Re: How to disable right click and ctrl+c use in a web page

                Amar wrote:
                Michael Fesser wrote:
                >.oO(Amar)
                >>
                >>I am a newbie to PHP and have the task to create a page using PHP
                >>where in that page I need to disable all key operation as well as
                >>mouse operation even also the menu operation that means
                >>printscreen . I have only the java script code for mouse right click
                >>disable but that does not allow me to disable to do ctrl+c. So I
                >>need some help that can solve my task. Waiting for your replies.
                >>
                >Impossible. Don't waste your time with such things, you should do
                >something useful instead.
                >>
                >Micha
                >
                Thanks all for your comments but I have to find such a way
                _have_ to? I'm sorry my man, you're doomed to roam the earth forever in
                search of a non-existing salvation.

                If you'd be so kind as to tell us _why_ you want this horrible evil, maybe
                we can tell you what _can_ be done.
                --
                Rik Wasmus


                Comment

                • Michael Fesser

                  #9
                  Re: How to disable right click and ctrl+c use in a web page

                  ..oO(Amar)
                  >Thanks all for your comments but I have to find such a way that will
                  >help me to do so.
                  You won't be able to find a way, because there is none!
                  >As I had mentioned that I can use javascript for
                  >mouse button disabling
                  You can't. It may work in some old and broken browsers, but not in
                  modern ones. And even in an old browser all it needs is turning off JS
                  to kill your "protection " script.

                  Micha

                  Comment

                  • Dennis K.

                    #10
                    Re: How to disable right click and ctrl+c use in a web page

                    On 20 Dec 2006 21:26:44 -0800, "Amar" <ghungur.2006@g mail.comwrote:
                    >I can use javascript for
                    >mouse button disabling
                    When I encounter this I simply disable javascript for that page, and
                    re-enable javascript after I leave the page. Your efforts will only stop
                    browser newbies and annoy everyone else.

                    --

                    Dennis K.

                    Comment

                    • Moot

                      #11
                      Re: How to disable right click and ctrl+c use in a web page

                      Amar wrote:
                      Michael Fesser wrote:
                      Impossible. Don't waste your time with such things, you should do
                      something useful instead.

                      Micha
                      >
                      Thanks all for your comments but I have to find such a way that will
                      help me to do so.
                      If your requirements absolutely *need* protection like this, then I
                      suggest you go back to the drawing board and decide if the browser is
                      really where you want to implement this. It offers none of the
                      protections you require, and anything it does have will be half-baked
                      and easily circumvented. In short, the word "impossible " was not a
                      joke...it was the truth.

                      You need an environment that gives you more control over what the
                      end-user does. If it absolutely needs to live on the web, probably
                      Flash is your best bet, or maybe a Java Applet. Otherwise, consider a
                      client-side application to give you the most control. If it needs to
                      pull data from the web, you can easily wrap the data in a secure web
                      service and have the application talk to that.

                      - Moot

                      Comment

                      • jussist@gmail.com

                        #12
                        Re: How to disable right click and ctrl+c use in a web page

                        My 1/20 of a meter.

                        _this is impossible_

                        But...

                        You can use javascript for that kind of ugly functionalities , but
                        javascript can be disabled _very easily_. Thou, there is a lot of
                        internet users who just couldn't do this, even if they would be rather
                        experienced internet (or computer) users. There is also lots of people
                        who don't know how to do this, but could find out easily with google,
                        but just don't bother to do so. Anyone with any computer skills can
                        disable javascript by using google, so if you really really _really_
                        need to prevent people from ctrl+cing, you really really _really_
                        cannot do that, in browser -environment, that is. But if it is ok to
                        prevent some people from copying, go with the ugly javascript -stuff.

                        And with printscreen, users can always focus on another window, like
                        opening notepad and resizing it very small, and then hit printscreen.
                        Your javascript hack wouldn't work with the notepad focused, would it?
                        But this again needs a bit creativity.

                        jussi

                        Comment

                        • Curtis

                          #13
                          Re: How to disable right click and ctrl+c use in a web page

                          On top of that, some browsers limit JavaScript by default, so even the
                          most basic user may not be affected by the JS hack. Whatever you're
                          doing, it can be implemented in a better way.

                          On Dec 20, 9:26 pm, "Amar" <ghungur.2...@g mail.comwrote:
                          Michael Fesser wrote:
                          .oO(Amar)
                          >
                          >I am a newbie to PHP and have the task to create a page using PHP where
                          >in that page I need to disable all key operation as well as mouse
                          >operation even also the menu operation that means printscreen. I have
                          >only the java script code for mouse right click disable but that does
                          >not allow me to disable to do ctrl+c. So I need some help that can
                          >solve my task. Waiting for your replies.
                          >
                          Impossible. Don't waste your time with such things, you should do
                          something useful instead.
                          >
                          MichaThanks all for your comments but I have to find such a way that will
                          help me to do so. As I had mentioned that I can use javascript for
                          mouse button disabling but for key board (ctrl+c and printscreen) I
                          need some help. Whatever thanks again for all your suggestions and
                          comments if any solutions then please welcome.
                          >
                          Thank again,
                          Amar

                          Comment

                          • Tim Roberts

                            #14
                            Re: How to disable right click and ctrl+c use in a web page

                            "Amar" <ghungur.2006@g mail.comwrote:
                            >
                            >Michael Fesser wrote:
                            >.oO(Amar)
                            >>
                            >I am a newbie to PHP and have the task to create a page using PHP where
                            >in that page I need to disable all key operation as well as mouse
                            >operation even also the menu operation that means printscreen. I have
                            >only the java script code for mouse right click disable but that does
                            >not allow me to disable to do ctrl+c. So I need some help that can
                            >solve my task. Waiting for your replies.
                            >>
                            >Impossible. Don't waste your time with such things, you should do
                            >something useful instead.
                            >
                            >Thanks all for your comments but I have to find such a way that will
                            >help me to do so. As I had mentioned that I can use javascript for
                            >mouse button disabling but for key board (ctrl+c and printscreen) I
                            >need some help. Whatever thanks again for all your suggestions and
                            >comments if any solutions then please welcome.
                            If you truly need to present information with that level of control, then
                            you cannot use a web page to deliver it. You will have to write your own
                            custom application to fetch the information and present it. As long as you
                            are using a standard web browser, your web page will be copied to my
                            computer. Once it's on my computer, it is MINE. You can't stop me.
                            --
                            Tim Roberts, timr@probo.com
                            Providenza & Boekelheide, Inc.

                            Comment

                            • Gordon Burditt

                              #15
                              Re: How to disable right click and ctrl+c use in a web page

                              >If you truly need to present information with that level of control, then
                              >you cannot use a web page to deliver it.
                              I suggest using a lawyer and some armed goons.

                              First, get the person to view this information to sign an iron-clad
                              nondisclosure agreement. Then, have him meet at a place you've
                              arranged, have him strip naked, give him the document, and let him
                              read it alone in a (windowless, soundproof) room you've prepared.
                              Get the document back in exchange for his clothes and letting him
                              leave. You need to make absolutely sure he can't bring into the
                              room or find there: pens, paper, pencils, cellphones (especially
                              with cameras, but he could also read the document into his answering
                              machine), phones, computers, internet connection, PDA, listening
                              device, radio transmitter, window, RFID devices, etc. Even a lump
                              of coal used to write on his hand needs to be forbidden.

                              What kind of information is actually WORTH all this trouble?
                              >You will have to write your own
                              >custom application to fetch the information and present it. As long as you
                              >are using a standard web browser, your web page will be copied to my
                              >computer. Once it's on my computer, it is MINE. You can't stop me.
                              Microsoft with Vista is going to try. And they'll fail.


                              Comment

                              Working...