944,007 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 7015
  • PHP RSS
You are currently viewing page 1 of this multi-page discussion thread
Jul 15th, 2007
0

Hide source of the page

Expand Post »
Hello to every body who visit this thread
I want to prevent view source(html tags & javascript scripts) of the page with php. I've studied php manual withuot any success how can I do it? Is it possible
Last edited by MB1765; Jul 15th, 2007 at 5:25 am.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MB1765 is offline Offline
8 posts
since Jul 2007
Jul 15th, 2007
0

Re: Hide source of the page

I don't see how you can hide the source that gets sent to the client browser. Code within the PHP tags would be processed at the server end anyway. So data such as database login wouldn't be sent to the client machine anyway.
Reputation Points: 27
Solved Threads: 14
Junior Poster
Cerberus is offline Offline
162 posts
since Sep 2006
Jul 15th, 2007
0

Re: Hide source of the page

I know ! But I want prevent show client source of the web. Ofcourse I think that I ask wrong, however generally I want to hide html tags and javascript scripts. What is the solution?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MB1765 is offline Offline
8 posts
since Jul 2007
Jul 15th, 2007
0

Re: Hide source of the page

I don't think this is possible because your web browser requires the source and viewing the source code is a function of the browser.

Is there any particular reason you need to do this?
Reputation Points: 27
Solved Threads: 14
Junior Poster
Cerberus is offline Offline
162 posts
since Sep 2006
Jul 15th, 2007
0

Re: Hide source of the page

Yes, I want to hide my javascript functions. I want to block it. but you right it seems impossible with php.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MB1765 is offline Offline
8 posts
since Jul 2007
Jul 15th, 2007
0

Re: Hide source of the page

I don't think this is possible. Encryption might be an idea but that's very very doubtful.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Jul 15th, 2007
0

Re: Hide source of the page

You can't reliably do it. If someone wants it they will get it. If you don't want people to have it, don't put it on thew web.

FYI, your javascript is not special. If you can write it, so can anyone else who knows javascript. Hiding it is pointless.
Moderator
Reputation Points: 161
Solved Threads: 38
He's No Good To Me Dead
stymiee is offline Offline
1,422 posts
since May 2006
Jul 16th, 2007
0

Re: Hide source of the page

I you are writing an application where you want to hide all your code you can use something like Zend or Ioncube.

For Javascript you can use encyption to make it 'harder' to read and copy. If you tell what this javascript does and why should it be protected maybe there is an alternative to having the code more secure.

Tim
Reputation Points: 11
Solved Threads: 2
Newbie Poster
dezignwork is offline Offline
21 posts
since Jul 2007
Jul 16th, 2007
0

Re: Hide source of the page

There's one way to do it, there's one program called HTML Encryptor, you can google search to that. I used to use it a while back.. but it seems useless and crappy because it changed several things... XD a.k.a it's not a reliable software.. but pretty nice, they encrypted everything..
Reputation Points: 21
Solved Threads: 7
Junior Poster in Training
ProgrammersTalk is offline Offline
83 posts
since Jun 2007
Jul 16th, 2007
0

Re: Hide source of the page

One way I can think of which can prevent a novice computer literate person is by using a No Right Click Java Script.

This method can only slow down a person from viewing your source as there are many other way to get the source.
Also you may want to read this Article on why not to use a No Right Click Java Script :
http://websiteowner.info/articles/et...rightclick.asp

The Article also mentions few ways to prevent source code to be easily read.
Hope that helps...
Reputation Points: 10
Solved Threads: 1
Junior Poster
ashneet is offline Offline
147 posts
since Jun 2005

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: SQL Modify
Next Thread in PHP Forum Timeline: changing the .php extension and Apache mod_rewrite question





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC