טרענספערן פיילס דירעקט פון איין סערווער צו די צווייטע

4 געראטעוועטע הודעות אויף דעם בלאט

http://balboos.com/forum/showthread.php?tid=303

געראטעוועטער אשכול · נאר צום לייענען
שריפט
2012-01-24 16:15#1
טרענספערן פיילס דירעקט פון איין סערווער צו די צווייטע
איז דא א גרינגע מהלך צו טרענספערן פיילס דירעקט פון איין סערווער צו די צווייטע?
אן דארפען דאונלאדען דירעקט צו מיין קאמפיוטער און דערנאך אפלאדען (איך רעד פון עטליכע גיגאבייטס)
איך ווייס אז מען קען עס טון דורך א קאמפעליצירטע PHP סקריפט, איך רעדט אבער פון א פארהעלטענסמעסיגע גרינגע וועג.

(די שאלה איז פאר פראפעשאנעל וועב דעוועלאפערס, ווער עס פארשטייט נישט פון וואס מען רעדט זאל ביטע נישט איבערפרעגן)
2012-02-07 16:37#3
טרענספערן פיילס דירעקט פון איין סערווער צו די צווייטע
א דאנק פארן פרובירן ארויסצוהעלפן (וואספארא ניק האסטו דיר אויסגעקליבן?)
אבער ניין, FTP קען עס נישט טון, FTP ארבעט דירעקט פון מיין קאמפיוטער צו א FTP סערווער (יעדע וועב סערווער האט אינסטולירט א FTP סערווער, אדער קען מען אינסטולירן א FTP סערווער אויף סיי וועלכע קאמפיוטער, נאר כדי צו נוצן ערפאלגרייך ברויך מען האבן א סטעטיק איי. פי. אדרעס)
אבער FTP איז נישט קיין מיטל צו טרענספערן פון א רעמאוט סערווער צו א רעמאוט סערווער, חוץ אז די ווילסט עס קודם דאונלאדען צו דיר, אבער דעמאלס איז עס נישט קיין "סערווער צו סערווער".
כאב געשריבן טאקע אז איך רעד צו פראפעשאנעל וועב דעוועלאפערס, זעט אויס אז זיי געפינען זיך נישט דא Sad
2012-02-16 18:35#4
טרענספערן פיילס דירעקט פון איין סערווער צו די צווייטע
you haven't described your situation what type of access you have but from your words I assume that you are a web developer and these servers are hosted servers on which you have deployed a web application and you have access to only upload to the document root etc.
as such I don't understand why you consider a php script as complicated just expose your file to the web, you can use a complicated url for security and on the second server just do a script something like
(look up the exact syntax)
PHP Code:
<?php
  $file1 
= fopen(your first file url ,'r') 
  
$file2 = fopen(local path to save, 'w')
$str = ""; 
while(!
feof($file1))
{
    
$str1 = $fread($file1, 1000);
    
$fwrite($file2, $str1);
}
fclose($file1);
fclose($file2);
?>
the code came out iil formatted because of the right to left direction and I don't have time to fix it so just reformat it


EDIT: If you have an FTP server on your server that the file is, then you can just use FTP as I beleive that fopen accetps even FTP and not just HTTP
EDIT: I looked up your question and it appears to me that you do have full access to the system, and as such I have no clue why you can't use ftp or just expose it in your web server, as servers can have FTP clients and browsers, and proffesional web developers make use of them a lot
Furthermore the link that the one who answered before me gave you shows directly how to transfer files between two FTP servers
If your problem is that you have a command line linux system - as opposed to a linux gui based system such as xwindows - then there should be many ftp clients and browsers, and even on a windows-server-2008-core there is probably ftp clients
But in case of linux I would recomend using the cp or scp command, but anyway such a case has nothing with web development unless you mean to see that you have an hosted server with limited access, in which case I would recomend you to ask the hosting provider how to do it

In such a case besides the solution I gave which is the simplest I can think of, you might also if the servers are also smtp and pop servers, and you know how to locate a client email on a pop server - I never bothered doing that and I even don't know if it is possible - then you can set the server you need the file as your own pop server and have a simple PHP script to email the file to your email account - using the mailto function in PHP and in .net use System.Net.Mail namespace - and the file will than arrive at your second server, and you just have to locate it there
Another hack might be to insert the file as a BLOB in a database and connect from the other server to the database to fetch it
Finally when you are done copying the files you might want to verify if the hashes of the files match to verify if the transfer was completed successfully

If all of these does not satisfy you, then you might try to post your question on serverfault or superuser - or on stackoverflow if it is related to developers task -, but note that you have to be more descriptive about your problem and explain what servers you have, what type of access, and what services, what type of file and what type of transfer, is it a one time task or recurring
Also if you think that your problem is related to web development you will have to explain how, remember general file transfer has nothing to do with web development
You might want first want to look around these sites to get the way how to ask how technical questions on these sites
And of course the first thing always is to google for your problem, of course - as always - you have to try different ways of searching for it
(געענדערט געווארן די לעצטע מאל: 02-16-12 10:23 PM דורך yoelhalb .)