I am doing a php site. My client have two web sites. But he need to handle both sites by a single admin. I have uploaded data to both databses by using multiple database connection. But my problem is how to upload image to another server. is it possible to do ?
upload image to another server
Collapse
X
-
Ammu,
What is wrong with uploading twice? Or, is that not workable solution for your client?
One option would be to create a group of PHP pages which upload an image, and then run a back-end process to move the image file to its final destination on both of the servers.
Another solution that I used to address security issues with image files (and issues with malbehaved staff) was to host the site's images in the database. That way the images were easily auditable (and difficult for the afforementioned staff to manipulate). I used a simple CGI script to access them, transparently, as if they were residing in the "image" directory of the file system.
Hope that helps.
Cheers,
Oralloy -
Good Morning, Ammu,
What have you done so far? Have you got a specific technical approach in mind?
Perhaps even more basically, what is the infrastructure that you are working on?
From reading some of your other threads, it looks like you are developing against Linux servers.
Are both your sites on one server/virtual-machine, or are they on separate servers/virtual-machines? Do they share a common NFS file-system?
Without knowing anything else, I would recommend that you use the FTP capability that is native in PHP. When I looked at the PHP site, there were some rather nice examples available in both the reference itsself, and in the users' comments.
PHP FTP Reference
PHP FTP Examples
Kind Regards,
OralloyComment
Comment