1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I download php page or view source code?

Discussion in 'PHP & Perl' started by stanvy, Dec 7, 2008.

  1. stanvy

    stanvy Registered Member

    Joined:
    Jul 10, 2008
    Messages:
    66
    Likes Received:
    7
    Hey there,

    Anyone know how do I download a php page or view the php source code?

    for example, www.abc.com/abc.php

    I want to view or download abc.php, of course, the website doesn't belongs to me.

    Any tools can do that?

    Appreciate your help here!
     
  2. stanvy

    stanvy Registered Member

    Joined:
    Jul 10, 2008
    Messages:
    66
    Likes Received:
    7
    nah, you can't see php source code with that method.

    you can only see html, css and javascript.

    I need to view php source code, anyone please?

    I know it should be possible...
     
  3. snowwhite

    snowwhite Power Member

    Joined:
    Feb 12, 2008
    Messages:
    730
    Likes Received:
    1,415
    Occupation:
    Psychiatrist
    Location:
    Las Islas Filipinas
    lol. is that your final answer?:newbie:
    its php not html dear


    stanvy, you may want to try httrack, although I havent tried it, sometimes it can download php files

    Code:
    http://www.httrack.com/
     
    • Thanks Thanks x 1
  4. macmastermike

    macmastermike Junior Member

    Joined:
    Apr 2, 2008
    Messages:
    116
    Likes Received:
    33
    Location:
    Grand Duchy of Bavaria
    you can only download/view the php code when the php-parser is deactivated. and this won't happen very often (i have only seen it one time)...

    so if you want to get the php code you'll need to have direct access to the server (ftp/ssh/...) or find a way/exploit to shut down the php parser... both ways are actually hacking so it's illegal and also it won't be easy if the app/server is secure
     
  5. jammie

    jammie Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 24, 2008
    Messages:
    773
    Likes Received:
    453
    MAC's right - PHP stands for PHP Hypertext processor - its actually a programming language thats compiled.

    Like imagine requesting to open MS word, you run the exe file and you get the program. You can't get the code. PHP is exactly the same (well, basically).

    Its compiled everytime it's requested. Unless you can get FTP access or something and download it without requesting it through the webservice, you'll never get the source.

    Just think of how many website databases and all the information contained in them would be screwed if you could!
     
  6. lozzzer

    lozzzer Regular Member

    Joined:
    Nov 14, 2008
    Messages:
    211
    Likes Received:
    37
    Location:
    BHW
    php is a server side lingo....u can not view PHP source unless u have access to server
     
  7. surajprakash31

    surajprakash31 Regular Member

    Joined:
    Oct 7, 2008
    Messages:
    261
    Likes Received:
    459
    Home Page:
    You just cannot get the php files unless you have access to the server.
     
  8. stanvy

    stanvy Registered Member

    Joined:
    Jul 10, 2008
    Messages:
    66
    Likes Received:
    7
    thanks snowwhite, I try to download and play with it later.

    Well, I know php files is server site, I just wanna see the code, not the database, and I'm not into hacking stuff, not against it, but totally know nothing into hacking.

    I'll keep you update if I'm successful with HTTrack
     
  9. silver

    silver Jr. VIP Jr. VIP

    Joined:
    Sep 16, 2008
    Messages:
    158
    Likes Received:
    103
    Occupation:
    Software Engineer & Entrepreneur
    if this stuff was possible we would just download the PHP source of any popular site (that uses php) and make a nice functioning copy of them and never pay for PHP scripts again!

    You have 2 options, pay a coder to reserve engineer your target site (make an exact copy of the site, with the same features) or hack into their servers and grab the PHP script.
     
  10. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    HTTrack will just bring down the parse PHP code, so you will see the output but still won't get the actual PHP code behind the scenes.
     
  11. aмillionaírе

    aмillionaírе Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 20, 2008
    Messages:
    532
    Likes Received:
    358
    Yup... you cannot see the code unless you have server access. HTTrack can't either. :)