473,320 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

Dec 20 '06 #1
14 3743
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
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
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
..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

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
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
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
..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
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
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
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
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
"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
>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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: George Hester | last post by:
In a page I have when the user left-clicks the page a Input box for a form gets the focus. But if the user right-clicks the page the Input box is not getting the focus. I'd like the Input box to...
5
by: Greg | last post by:
I am developing an application where I need to secure a workstation for periods of time. I can use BlockInput to stop users from task switching or messing with the keyboard, but I would like to...
6
by: nntp | last post by:
I have a set of links which I want search engines to crawl them, but I want to disable them from my visitors, so I will ask the link owners to pay me to let me enable them. <a disabled...
16
by: Alex Clark | last post by:
Hi All, I'm sure this must have been asked a million times due to it's usefulness, but are there any sensible solutions for disabling right click (and other services such as Ctrl+P, Browser...
16
by: MLH | last post by:
If I give someone a runtime app, they can open the database window by pressing the F-11 key. How to prevent???
2
by: RootSpy2006 | last post by:
Hi All, Problem Definition: --------------------- Microsoft Wirelss Keyboard works in BIOS but does not work when booting into windows. Discovered Work-around: -----------------------------...
3
by: vanya | last post by:
i have been tryin to program(javascript) to disable the following keystroke combinations CTRL+O or CTRL+L Go to a new location (O = 79 L = 76) CTRL+S Save the current page ( S = 83) CTRL+E...
1
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? -----------------------------------------------------------------------...
9
by: timw.google | last post by:
Is there a way to disable ctrl-P (print window) in IDLE? I'm editing some python code in IDLE and I keep hitting this by mistake from my years of emacs editing. Thanks in advance.
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.