Protecting PHP code?
Protecting PHP code?
I've written a small PHP script for use on a website... But I want to protect this from the people that view the website's source... How do I do it?
Advertising




Re: Protecting PHP code?
People who view the website's source are the website's administrators, why would you prevent them from seeing your php script?
At best you can obfuscate your script (there are tools for that, look for "obfuscate php" in google, I guess), but it won't prevent somebody with enough dedication to reverse it.
But again, I would question your goals, why would you prevent the administrators of a website to see what's on that website? That sounds dangerous to me.
At best you can obfuscate your script (there are tools for that, look for "obfuscate php" in google, I guess), but it won't prevent somebody with enough dedication to reverse it.
But again, I would question your goals, why would you prevent the administrators of a website to see what's on that website? That sounds dangerous to me.
Advertising
If you need US PSN Codes, this technique is what I recommend.
Looking for guest bloggers and news hunters here at wololo.net, PM me!
Looking for guest bloggers and news hunters here at wololo.net, PM me!
Re: Protecting PHP code?
No, I meant *right-click - view page source* people...wololo wrote:People who view the website's source are the website's administrators, why would you prevent them from seeing your php script?
At best you can obfuscate your script (there are tools for that, look for "obfuscate php" in google, I guess), but it won't prevent somebody with enough dedication to reverse it.
But again, I would question your goals, why would you prevent the administrators of a website to see what's on that website? That sounds dangerous to me.




- Xian Nox
- Retired Mod
- Posts: 2749
- Joined: Fri Nov 05, 2010 5:27 pm
- Location: Over the hills and far away
Re: Protecting PHP code?
They can't see the PHP code, since it's executed server-side.
Re: Protecting PHP code?
Lol, you're my story for this monday's coffee break at work, congratsNickolas wrote:No, I meant *right-click - view page source* people...wololo wrote:People who view the website's source are the website's administrators, why would you prevent them from seeing your php script?
At best you can obfuscate your script (there are tools for that, look for "obfuscate php" in google, I guess), but it won't prevent somebody with enough dedication to reverse it.
But again, I would question your goals, why would you prevent the administrators of a website to see what's on that website? That sounds dangerous to me.
If you need US PSN Codes, this technique is what I recommend.
Looking for guest bloggers and news hunters here at wololo.net, PM me!
Looking for guest bloggers and news hunters here at wololo.net, PM me!
Re: Protecting PHP code?
Still you don't get me. I need this code to be protected even if the server is hacked... I need it to be hidden somehow...Xian Nox wrote:They can't see the PHP code, since it's executed server-side.




Re: Protecting PHP code?
If your server is hacked, you should have much more concerns that your php script's content being accessed
If you need US PSN Codes, this technique is what I recommend.
Looking for guest bloggers and news hunters here at wololo.net, PM me!
Looking for guest bloggers and news hunters here at wololo.net, PM me!
Re: Protecting PHP code?
I have personal reasons to keep this script to myself... Is there any way to encrypt it?wololo wrote:If your server is hacked, you should have much more concerns that your php script's content being accessed




Re: Protecting PHP code?
No. How do you expect Apache to interpret and execute your script if your script is encrypted? As I said, at best you can obfuscate it.
If you need US PSN Codes, this technique is what I recommend.
Looking for guest bloggers and news hunters here at wololo.net, PM me!
Looking for guest bloggers and news hunters here at wololo.net, PM me!
Re: Protecting PHP code?
Hmm, I'll give it a try...wololo wrote:No. How do you expect Apache to interpret and execute your script if your script is encrypted? As I said, at best you can obfuscate it.




