homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

upload file(image) to different domains
is it possible?

 7:34 am on Jan 17, 2011 (gmt 0)

Hello all and thanks for any advice/tips.

We have a domain (www.site1.com) in one server (server1).
There, we give our users the option to upload images (jpg) to our server. They can do so from multiple pages and not just from one page).

After some years, we now need to move the new uploads to a new server/domain - we are running low on available disk space.

So, my question is: can our upload script sends the new images to a different domain to be stored there?
I mean: upload script works in site1.com (server1) and will store images in site2.com (server2).

The upload script works in a popup/modal window and includes some files (check login of user and some classes for resizing images).



 11:26 am on Jan 17, 2011 (gmt 0)

domain and its dir will have to be on the same server for your script to store uploaded files there


 12:46 pm on Jan 17, 2011 (gmt 0)

and the included files?
on same server as the script OR i can include them from different server?


 4:30 pm on Jan 17, 2011 (gmt 0)

Assuming the second domain is on a different server, then your upload script must reside within that second domain on the second server in order to store files there. So the <form> tag on your first domain will point to the script on the second domain. But once the upload had completed, you could certainly have that script redirect the user back to a page on the first domain so that they would not generally be aware of the second domain.


 4:50 pm on Jan 17, 2011 (gmt 0)

same for all code includes, they have to reside on the same server and must "Not" be called with http, cause then they will be returned to you parsed.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved