Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 12th, 2006, 02:56 PM
Authorized User
 
Join Date: Jan 2004
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Ashleek007
Default encrypting a php page

Hi,

I have a php file which i want to encrypt or protect so nobody can download the file from my server or read it if they do manage to get hold of it.

I know how to encrypt the file but need to know how to hide the file on the server so it isn't visible or downloadable to other users or potential hackers?!

mite be a real simple thing, but i tend to be scatty in my development!lol

Thanks,
Ash

My new web design domain
www.askmultimedia.co.uk
__________________
My new web design domain
www.askmultimedia.co.uk
 
Old March 13th, 2006, 02:39 PM
Authorized User
 
Join Date: Mar 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

put your file(s) in a blank folder and put a blank index.php or index.html file in the folder so when a user goes to say mydomain.com/protectfiles/ then he/she wont see what files are contained within that directory.

Also if a user tries to do something like this mydomain.com/protectedfiles/hiddenfile.php then hopefully, depending on how you have coded the file, it shouldn't send any output to browser. Also if a user trys to download hiddenfile.php in a web browser then they shouldn't be able to get the source code of the file, but only the output of file. The only way for the user to get the source code is by having FTP access.
 
Old March 31st, 2006, 07:35 AM
Authorized User
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You Can't Download any Php file from server Because Server Converted
Php Code Into HTML Format,If you want to chek it then you download any
side and chek it.You Never Find Any code except HTML format.



 
Old May 11th, 2006, 05:59 AM
Authorized User
 
Join Date: May 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to kaos_frack
Default

shek_lko is right
server executes and removes the php code and outputs the rest (text, html, javascript, etc)
so don't worry about that, no one can steal your php code
but if the server does not have php installed, it will output everything, including your php code






Similar Threads
Thread Thread Starter Forum Replies Last Post
Encrypting config vikingsunil ASP.NET 2.0 Professional 1 August 28th, 2008 10:53 PM
Encrypting Data harpua Pro PHP 3 June 4th, 2005 01:15 AM
passing value from Php to PHP page baby PHP How-To 3 March 31st, 2005 02:13 AM
Encrypting and Decrypting chipset VB How-To 0 July 27th, 2004 07:36 AM
querystring encrypting invitro Classic ASP Professional 1 April 5th, 2004 10:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.