I have some important PHP scripts on my server.
My problem is that with the help of a download manager, the user can download those scripts and thus can view the entire source code.

For e.g:- If my php script's URL is
www.mydomain.com/index.php

Then the user is able to download the "index.php" script by entering the above URL in a download manager and thus seeing how the coding is done.

I do not want the users to be able to download the scripts.

Please suggest me a solution for it.

Recommended Answers

All 3 Replies

Entering your php file directory into a Download manager will not download your php data only what the php file generates or "source". You don't have to worry about that. It's like people right clicking and selecting "View Source" on your browser, that is all they'll see.

For security reasons though you should make sure your Permissions are set properly per file google CHMOD

If your server is configured to parse and display php files, using the .php extension, then the only thing the end user will see is the parsed output of the file.

I have some important PHP scripts on my server.
My problem is that with the help of a download manager, the user can download those scripts and thus can view the entire source code.

For e.g:- If my php script's URL is
www.mydomain.com/index.php

Then the user is able to download the "index.php" script by entering the above URL in a download manager and thus seeing how the coding is done.

I do not want the users to be able to download the scripts.

Please suggest me a solution for it.

That magic download manager,
every site downloader I have only gets the output html,
I scraped my own site,
the php is not seen.

Be a part of the DaniWeb community

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