Jump to content

Source Code Protection


TheFilmGod

Recommended Posts

Hey!

 

Is it possible to protect your source code. I have noticed that some php becomes hidden when a visitor "views source code" but the rest is completely free to copying and distrubution. Is it possible to cover it, and secure if from copying?

 

I researched and it said that it's not worth going up to this step, because it simply causes others to find a way to hack through and copy the source code. But even though, I'm interested if its possible?

Link to comment
https://forums.phpfreaks.com/topic/36845-source-code-protection/
Share on other sites

??? One of us is confused.

 

The only thing from PHP (which I am assuming you are talking about because you're in the PHP forum) that is viewable when a user views source is whatever you print out from PHP. So if the rest is completely free for the copying, then you've messed up... In which case, I probably wouldn't want to copy or distribute your code anyhow :)

 

Now Javascript is another matter.

 

 

There is no way, as far as I know, to 100% prevent HTML source viewing. I'm not sure why anyone would care enough to protect it.

 

PHP source code is never sent to the browser. It's not hidden. It just doesn't get that far. It's server execution programming. HTML is client side execution, that's why you can see the source. Because that IS sent.

 

It's like being able to take the car that you bought apart (HTML and Javascript), but having no idea about the machines that actually put it together (PHP/ASP/Perl/etc) in the factory (server).

 

 

Of course, if you do visit the factory (have server access), then you can see the machines (PHP source code). But that's what Zend Gaurd is for, if you REALLY don't want people seeing your PHP.

There is no way, as far as I know, to 100% prevent HTML source viewing. I'm not sure why anyone would care enough to protect it.

 

PHP source code is never sent to the browser. It's not hidden. It just doesn't get that far. It's server execution programming. HTML is client side execution, that's why you can see the source. Because that IS sent.

 

It's like being able to take the car that you bought apart (HTML and Javascript), but having no idea about the machines that actually put it together (PHP/ASP/Perl/etc) in the factory (server).

 

 

Of course, if you do visit the factory (have server access), then you can see the machines (PHP source code). But that's what Zend Gaurd is for, if you REALLY don't want people seeing your PHP.

 

lol, that is a great example ^^ :P

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.