Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Dec 2007
    Posts
    65
    Thanks
    1
    Thanked 0 Times in 0 Posts

    transfer file to different server secure not sftp

    I need to transfer some files from one server to a folder on a nother server but I do not have access to sftp and this needs to be done programatically and securely.

    What would be the best way to do it? Using a web service in the target server or using curl to transfer the file via SSL?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    You can use either if you intend to use TLS. Web services will take more work since you need to write server and client, while curl or sockets would simply let you pump data through as a post.
    Why can't you use sftp? How do you plan to get the files up there in the first place?
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New Coder
    Join Date
    Dec 2007
    Posts
    65
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    You can use either if you intend to use TLS. Web services will take more work since you need to write server and client, while curl or sockets would simply let you pump data through as a post.
    Why can't you use sftp? How do you plan to get the files up there in the first place?
    The files are held on server2 and they need to go to server1 to be displayed on a webpage. However server1 does not have sftp as the hosting company do not provide it or have locked it off.

    If I use cURL, does server1 need an html form/php to accept the posted file?

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    It'll need something to process it.
    HTML isn't a requirement for any web programming. It's easy to make something though.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #5
    New Coder
    Join Date
    Dec 2007
    Posts
    65
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    It'll need something to process it.
    HTML isn't a requirement for any web programming. It's easy to make something though.
    Presumably server2 needs some PHP code to validate and check the post though otherwise anything could post to the html form?

  • #6
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    That would be correct. If you don't have something like [s]ftp or ssh to use, than you'll need to write something to handle it. Nothing says it has to be web based though.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

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