If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > Need PHP script for this

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Sep 2012
Posts: 21
Need PHP script for this

Friends,can i have some help?
i need 2 php scripts:
1. one that disables right click
2. second that when open the source it shows NOTHING or something that i want
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Sep 2012
Posts: 21
Pls. someone share for this question...its really need for me
Reply With Quote
  #3 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 12,175
You cannot disable right click in classic, web based PHP. you may be able to do that in command line/batch PHP though

what you might be able to do is use Javascript to inhibit the right click methods used buy the browser, however Im not really up to speed on Javascript so I don't know if that will meet your requirements

Quote:
econd that when open the source it shows NOTHING or something that i want
sorry I haven't got a clue what you are trying to do, or what you are struggling with here.
within PHP you can test for the existence of resources and take appropriate action. I think that test only wokrs on local resources (IE you can test if an image in on the same physcial server, but you cannot test if a remote resources is present, that may well have changed with subsequent releases of PHP)

hgowever I suspect you coudl test if resources are found using javascript.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #4 (permalink)  
Old
Programming since 1BC
 
Join Date: Sep 2009
Location: Ontario
Posts: 978
He wants to prevent a user from viewing his php code by clicking on "view source" in the browser.
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Sep 2012
Posts: 21
Ok i agree with your answer..i ll change that
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Jan 2012
Posts: 19
i understand what he is saying... he wants to wrote some lines like anything...

sdfasdf
adf
adf
ad

and he wants nobody can right click on his page...

this happen using adding javascript code google it javascript right click disable

and another one is that

when a person view his source the page only display some header tags and hide the content in the source so nobody copy the content of his page...
Reply With Quote
  #7 (permalink)  
Old
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 11,008
PHP is a server side language. Right-click events are on the client side.

Therefore PHP cannot be used to disable the right-click.

Furthermore; when a user views the source of the page: no PHP code is shown, only the resultant HTML that is produced and sent to the browser.

Why do you want to perform these actions anyway?
__________________
George
Home | Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On