Upload to host

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
xor83
Forum Newbie
Posts: 5
Joined: Tue Feb 05, 2008 11:01 pm

Upload to host

Post by xor83 »

I want to upload file to my dreamhost server from other URL location is that possible. There are many upload sample which upload files from clients local machine but i want to upload from different location can i do that? any help?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: Upload to host

Post by Kieran Huggins »

You want to upload the file to your dreamhost server when a form is submitted to another server? You could use php's FTP functions to send it along.

Check out http://ca.php.net/ftp for details
xor83
Forum Newbie
Posts: 5
Joined: Tue Feb 05, 2008 11:01 pm

Re: Upload to host

Post by xor83 »

Kieran Huggins wrote:You want to upload the file to your dreamhost server when a form is submitted to another server? You could use php's FTP functions to send it along.

Check out http://ca.php.net/ftp for details
Thanks for your help :)
yes i want that one form is showed to the user the user put URL in that form and it should upload that file to my dreamhost server.. becuz i don't have that much bandwidth to upload file i want to use dreamhost available B/W so.... is there any issues regarding bandwidth? is that allowed?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: Upload to host

Post by Kieran Huggins »

You can only submit a form to one server at a time. You may want to set up a form controller on DH to accept this form (including the file) and then submit a form FROM your dreamhost server TO your other server using cURL with everything except the file data.

http://ca3.php.net/curl
xor83
Forum Newbie
Posts: 5
Joined: Tue Feb 05, 2008 11:01 pm

Re: Upload to host

Post by xor83 »

Thanks for your great help... this is what i want :D
Post Reply