Jump to content

[SOLVED] gettting files from Server A to Server B then back to Server A.


DanDaBeginner

Recommended Posts

I've been bangin my head now. please help.

 

this is the scenario.

 

im converting .wmv files From Server B to .flv, im using ffmpeg to achieved this, but this is not the issue.

 

now the problem is Server B doesn't have ffmpeg installed, but Server A has ffmpeg installed. now my problem is, is there a way that I can get the files automatically/using PHP from Server B to Server A then convert to .flv, then after converting, the .flv file from Server A back to Server B.

 

 

or if you have a better solution please help.

 

if you find my explanation is too blurry please bump.

 

thank you very very much...

Link to comment
Share on other sites

you can use the ftp functions in php to transfer files you'll have to have a cron setup on server A to process the files to process the files and send it back to server A

 

so B ->(ftp files to server A)

and A(processes files) -> (ftp back to server A)

 

But this process will not happen on the fly, I am currently doing something like this for a report section on a client site

Link to comment
Share on other sites

Well I would suggust not to go on with transfering files from on server to another I've faced lot of problems with the server connections, the best way would be installing ffmpeg on the required server or if you still want to go ahead with two servers make a NFS link(In Unix) to the processing server so the source server directly places files on the processing server and picks up files from the processing server.

 

Link to comment
Share on other sites

  • 2 weeks later...

Well this is not as difficult as you think, i m also going to do this in few days and all the logic and scenerio has been made and only thing i need is to write a bunch of PHP code  ;D this is how my script will works

 

Server A : Has FFMPEG

Server B : Doesnt Has FFMPEG

 

now, i will create a page ON SERVER A, which will do this

 

--> Uploads the File , Encode The File and Pass the encoded file Value to a unique URL that will sends the information to SERVER B i.e

 

{

UPLOAD

ENCODE

SAVES

header(location:http://serverbwebsite/fileinfo.php?url=http://serveraweAsite/encodedfiledirectory/$file.flv&name=$name&size=$126);

}

http://serverbwebsite/fileinfo.php?url=http://serveraweAsite/encodedfiledirectory/file1.flv&name=name&size=126  or whatever

 

fileinfo.php has a function through wich it will COPY the file from server B to Server A using $_GET['url'] , saves the file in database using its name and size and whatever you like...

 

AND THE WHole process will go in an IFRAME that is placed on SERVER B  ;D

 

 

hope this overview hepls u in doing your work, althoun i havent made the script yet, but will make it as soon as i will have enough time to manage it  :P

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.