By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,203 Members | 1,560 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,203 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Dec 20 '06 #1
Share this Question
Share on Google+
14 Replies


P: n/a
On 20 Dec 2006 06:55:02 -0800, in comp.lang.php "Amar"
<gh**********@gmail.com>
<11**********************@80g2000cwy.googlegroups. 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.
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Dec 20 '06 #2

P: n/a
no
On 20 Dec 2006 06:55:02 -0800, "Amar" <gh**********@gmail.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.
Dec 20 '06 #3

P: n/a
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
Dec 20 '06 #4

P: n/a
..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
Dec 21 '06 #5

P: n/a

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

Dec 21 '06 #6

P: n/a
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

Dec 21 '06 #7

P: n/a
Rik
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
Dec 21 '06 #8

P: n/a
..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
Dec 21 '06 #9

P: n/a
On 20 Dec 2006 21:26:44 -0800, "Amar" <gh**********@gmail.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.
Dec 21 '06 #10

P: n/a
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

Dec 21 '06 #11

P: n/a
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

Dec 22 '06 #12

P: n/a
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...@gmail.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
Dec 22 '06 #13

P: n/a
"Amar" <gh**********@gmail.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, ti**@probo.com
Providenza & Boekelheide, Inc.
Dec 25 '06 #14

P: n/a
>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.
Dec 25 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.