My scenario is I have a file(not an image, some .txt) on my machine which has a Xampp running, now i need to copy it to a certain location(dir) on a remote machine.This should happen through Php I tried exploring cUrl,$_FILES, and others things, none worked. All the similar questions have answers assuming FTP, or that the remote machine has a handler php, or that user(who will run that php) is going to choose the file to upload which is not. Can somebody please help me Other info is the Xampp is on windows but the remote is a linux machine
Asked
Active
Viewed 49 times
0
-
2Could we see some code that you have tried. This seems like you want someone here to write it for you. – Daniel Casserly Dec 12 '14 at 13:59
-
Did you try something?? – Satish Shinde Dec 12 '14 at 14:01
-
I tried alot of things actually but anyways I will put all my code here – Ashwin Madakasira Dec 12 '14 at 14:05
-
@DanielCasserly I tried this http://stackoverflow.com/questions/4514817/cron-job-wont-write-to-file – Ashwin Madakasira Dec 12 '14 at 14:06
-
@DanielCasserly http://stackoverflow.com/questions/22892462/multiple-files-uploader-that-integrates-well-with-existing-form – Ashwin Madakasira Dec 12 '14 at 14:07
-
as you can see neither cover my scenario and i am unable to make them work for me – Ashwin Madakasira Dec 12 '14 at 14:07
-
http://code.stephenmorley.org/php/sending-files-using-curl/ This also – Ashwin Madakasira Dec 12 '14 at 14:08
-
http://stackoverflow.com/questions/4223977/send-file-via-curl-from-form-post-in-php – Ashwin Madakasira Dec 12 '14 at 14:09
-
But i don't understand, you don't want to use ftp or set up a handler on a remote server and yet you want to send it files? How will that work in practice? Take out the code. How would you send a file to a remote computer manually? – Daniel Casserly Dec 12 '14 at 14:09
-
@DanielCasserly Implementing a handler poses a security and performance issue for the scenario, I was thinking of calling curl in windows using Php exec...but that is too crude and unreliable – Ashwin Madakasira Dec 12 '14 at 14:14