Page 1 of 1
Download a php file ?
Posted: Wed Dec 10, 2003 1:37 am
by anjanesh
I have a php file on the server. When a internet user visits the page, the html code is the one that is sent. But what is the user downloads it (as in save as or use some download manager like DAP & give the url:someurl/somepage.php) ? Is it possible for him to get the code ? I mean, if we write a vb code using the inet control I think its posible to get the code.
Thanks
i dont know whats inet control
Posted: Wed Dec 10, 2003 2:50 am
by pelegk2
but php cant be d/l and saved beacuse hwen u reference it
the serverautomaticlly runs is
Posted: Wed Dec 10, 2003 4:52 am
by twigletmac
Yep, PHP is server side, so by the time the user gets to it all they get is the generated client-side code (HTML and JavaScript) not any PHP code.
Mac
Posted: Thu Dec 11, 2003 1:44 am
by Vietboy
if you can save php files.. then it's pointless to with the admin control
Peopl can dl files and view your user/pass to login in the mySQL databse.
Posted: Thu Dec 11, 2003 1:49 am
by aquila125
not necessarily...
good PHP code should be safe even when downloaded by a hacker... make sure you put your .inc files (like db_conf.inc) in a seperate folder, and don't give webusers access to this folder... PHP will have access and have no problem with opening it...
Second is your database security.. make sure the user you'r using in your php script only has the necessary security settings to do only what it has to do (no drop tables and such)... also make sure that that user can only connect from a fixed IP (eg localhost)
Posted: Thu Dec 11, 2003 1:52 am
by pelegk2
if u ask me never use inc file ony php
more safer
Posted: Thu Dec 11, 2003 2:08 am
by m3mn0n
I use inc.php to seperate the two. Never .inc.
Posted: Thu Dec 11, 2003 5:50 am
by AnsonM
i thought u could use something like websnake to mirror a copy of a site on your computer..
try searching for it on google...
but it probably wont work cuz php is server side
Posted: Thu Dec 11, 2003 5:53 am
by Pyrite
You could rename a copy of the php file to .phps so they can view the source. Or use the highlight function to setup your site so ppl can view the source on each page.