Hi i have a friend which he gave a php file that is link to their company website which he work with.
but when i view source the company website i cannot find the php location. He said its not visible because they encrpt the php code into the server????
I really don't know what he is talking about?

I'm a very curious how they do that? I'm very noob at web developing..
Can you guys tell me how they do that?

I mean you upload your file to hosting server and then it hides your php files?

Recommended Answers

All 4 Replies

They could be using something like http://www.ioncube.com/

The PHP gets encrypted by the application and when it comes time for the web server to serve up one of the files, it passes the files to be decrypted by the encryption program before passing it over to PHP to process the code. It basically just sits in front of the PHP install on the server and hands off the decrypted files to PHP.

I think that this is a fundamental misunderstanding of PHP and how it works.

When you "view source" on a web page created with PHP, you won't see any PHP code, but instead you will see the HTML that is rendered from the PHP.

The ONLY way to view PHP code is to have the file on your computer and opening it with a text/code editor of your choice. Yes, this includes notepad or whatever you like.

By the time a PHP page reaches the browser, it has already been "executed" and therefore is no longer viewable.

Does that help?

I may have misread what he had posted. I thought he had gotten an actual file from a friend.

Now I see he said "link to their company website"... doh!

ryantroop is correct. And thank god people can't view source and see all of the PHP lol.

OH!.. i just check it out and yes its really hiddent the php code.. COOL!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.