SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    933
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Arrow Is it possible to grab PHP from the server?

    Hi, i'm just wondering how to grab a PHP script from the server.

    Let say i'm here seating at the front of my computer and i found a PHP
    script that i full in love then i would like it to grab the script from the server.

    Is this possible?

    Or do do i need to create spider first to do this?

    thanks in advance.

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well if the script is on your server then yes you can get it via your control panel or using ftp.

    I'm assuming this isn't what you mean though and you want to grab a php script from someone else's server. There is no legal (at least in this country) way to do this without the permission of the owner of the server.

    However you may be able to find a similar script at one of the script directory sites. I've made a list of such sites on the digitalpoint forums
    Web Development Blog - Useful bits & pieces

  3. #3
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by solidcodes View Post
    Hi, i'm just wondering how to grab a PHP script from the server.

    Let say i'm here seating at the front of my computer and i found a PHP
    script that i full in love then i would like it to grab the script from the server.

    Is this possible?

    Or do do i need to create spider first to do this?

    thanks in advance.
    You can't create a 'spider' or any other program to get the PHP code on someone else's server. PHP code is executed on the server and its output sent to the browser. You have no access to the code itself.

  4. #4
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    933
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Arrow

    how about if i'm going to create a spider and let say the target domain name
    is www.domain-one.com, now i found out that that domain name has PHP support then what if i'll make one spider then read all the files and all directories and subdirectories and grab all .php files from www.domain-two.com using
    php also.

    Is this possible?

    thanks in advance.

  5. #5
    SitePoint Addict tbakerisageek's Avatar
    Join Date
    Sep 2006
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by solidcodes View Post
    how about if i'm going to create a spider and let say the target domain name
    is www.domain-one.com, now i found out that that domain name has PHP support then what if i'll make one spider then read all the files and all directories and subdirectories and grab all .php files from www.domain-two.com using
    php also.

    Is this possible?

    thanks in advance.
    I think you missed Dan's point. PHP is a server side scripting language. This means that the "source" of the PHP files is never displayed to a browser window unless this is intended by the author. If you use a spiderbot or just read the source code, you will not see any of the PHP language.

    Granted the file extension of the output is .php this does not mean that you will see how the page was generated. This is why I feel that PHP is much more secure than other languages to make things happen (Like Javascript for example)

  6. #6
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Uk
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the specfic folder/area was not protected (htaccess or index.html file present) you could easly point to a folder and read the dir listing from it and gain access to php files. You cannot however point straight to a php file and hope to read the contents the way you have suggested.


    Quote Originally Posted by solidcodes View Post
    how about if i'm going to create a spider and let say the target domain name
    is www.domain-one.com, now i found out that that domain name has PHP support then what if i'll make one spider then read all the files and all directories and subdirectories and grab all .php files from www.domain-two.com using
    php also.

    Is this possible?

    thanks in advance.

  7. #7
    Non-Member
    Join Date
    Apr 2006
    Location
    Scotland
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it was possible to steal php scripts from other sites then you would be able to steal the password of any site you want. Use your brain and think before posting...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •