How to copy file from one server to another and execute?

Discussion in 'PHP' started by Anveto, Sep 10, 2010.

  1. #1
    I want to make some kind of php program which could be accessed on server A, when executed it would copy a file to server B and execute that file, that's all.

    Currently I am working with cpanel/whm and I could use the root user and pass or the users account user and pass to do this, whichever is easier. Any help on this?
     
    Anveto, Sep 10, 2010 IP
  2. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #2
    You mean by server, they are different virtual server on the same machine? If they are you need permissions on both directories. If they are not, you will need something like ftp.
     
    Kaizoku, Sep 13, 2010 IP
  3. Anveto

    Anveto Well-Known Member

    Messages:
    697
    Likes Received:
    40
    Best Answers:
    19
    Trophy Points:
    195
    #3
    Thanks, I figured it out using the ftp up command in php and then after that I used the <form action=""> method to make the file execute on the server.
     
    Anveto, Sep 13, 2010 IP