|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
PHP5 - Write file to another server
Hello all,
Is it possible with PHP to write a file to another server? I am aware you can transfer files to another server by using ftp etc. I don't want to have any copy of the file that i need written on my server. If PHP can't do, is there anything else that can? Thanks all ![]() |
|
#2
|
||||
|
||||
|
It really depends on what services are running on the other server, and what you have access to. ftp would be my first choice, if that wasn't available, I'd look into using exec to call scp command (I'm making the assumption your on linux here). If that was available, next I'd look into setting up a web page on the other server to handle file uploads, then use curl for doing the upload.
__________________
"I'm working so I won't have to try so hard" - the strokes my blog security articles I recommend: SQL Injection Attacks XSS CSRF |
|
#3
|
||||
|
||||
|
Quote:
FTP - means that i have to actually have a copy of the file on my server and then send it. I don't want to keep copies, or even expend the effort to delete them after i use (send) them! Exec() - I am on a linux server and i think this is the best idea so far. What commands would you use though? CURL - Creating a page on the other server..hmm..Not sure about this since i may have to deal with many servers. I can't keep creating pages. But i guess i can use the first option and use ftp to send this file (initially, once) and then from then on use CURL!! What do you think? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > PHP5 - Write file to another server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|