Upload file to other site

emmexx 02 Feb, 2013
I have the following problem.
The host where I should publish a form has some strict limits on the size of uploadable files.
I can't modify php.ini or use an .htaccess file.

I own another host that has no limits.

On the 1st host I already have a table with users info that I'd like to be able to use to validate user input.

I'd prefer not to redirect to the 2nd host to let users enter data and upload files.

Is there a simple way to let user enter data on the 1st site, select one file to upload, send the data to the 2nd host, get a response and update data in a table in the 1st host?

I suppose I should use curl or http request but I couldn't find info about using them to upload files.

Thank you
maxx
GreyHead 02 Feb, 2013
Hi maxx,

I was able to do something a bit similar to deliver advertising files to a remote site. I think I used the PHP FTP commands. There's a StackOverFlow answer here that might help.

Bob

PS I think that DropBox also has an API that you could use to off-load them there.
emmexx 02 Feb, 2013

I was able to do something a bit similar to deliver advertising files to a remote site. I think I used the PHP FTP commands. There's a StackOverFlow answer here that might help.



If I understand correctly the code over there, I should first upload the file to the 1st host. Buth that is not working.

PS I think that DropBox also has an API that you could use to off-load them there.


[/quote]

I'll check that too or redirect to the 2nd host.

thank you
maxx
GreyHead 02 Feb, 2013
Hi Maxx,

Sorry, I don't think that you can upload directly form your form to another site using a normal file upload.

You could perhaps embed a mini-form from the second server on the page using an iFrame or a modal window and use that for the uploads.

Bob
This topic is locked and no more replies can be posted.