I'm trying to download the code for a PHP file, but every time I open it it tries to execute and gives me a blank page with no code. Is there any way to download a complete php file without executing it? I.e. if I wanted to download an index.php with all the < ?php tags in place. =| I'm afraid there's no copy of this left around as it contains hacked code from a CMS.
Go to the page on the internet, right click it, select view source (or view page source) and the code for the page will be presented. Copy and paste it into a blank document and save it as a php file.
KC TAN is correct. You'll need access to the server (ssh, ftp etc.) to be able to view the source. The only way you'd see the source with a browser is if the webserver isn't working right and not processing the php code before sending out the page.
If this is possible then everyone will be stealing everyone else's codes If it is your site, then can't you just get it via ftp?