Best way to copy from server to server?

  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

I have a video converter on http://www.*.com. After converting, it sends the file to img.*.com and want your ideas on how to send the file across. They are on different servers.

Currently, on http://www.*.com, I use something like this:

Code: [ Select ]
    fsockopen('img1.domain.com', 80);  
    fputs($fp,"POST /image_upload.php HTTP/1.1\r\n");
    etc etc etc...(also sends MD5 and password)
  1.     fsockopen('img1.domain.com', 80);  
  2.     fputs($fp,"POST /image_upload.php HTTP/1.1\r\n");
  3.     etc etc etc...(also sends MD5 and password)


On the recieving end (img1.*.com), I have image_upload.php that takes the POST'ed file and saves it disk...

Code: [ Select ]
    if (MD5 security check) {
    $fp = fopen(IMAGE_PATH . '/'. $filename,"w");
    fwrite($fp,$uploaded);
    fclose($fp);
  1.     if (MD5 security check) {
  2.     $fp = fopen(IMAGE_PATH . '/'. $filename,"w");
  3.     fwrite($fp,$uploaded);
  4.     fclose($fp);


This has been working fine between several servers, for a couple of years of service, but it's failing on 100MB + video files.

Does anyone think there is a better method of doing this?

JM
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

What about an FTP cron job or scheduled task? FTP should handle that size.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 84 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.