Well say i had the upload page on sever 1, but i want the images to go to sever 2, how would i go about doing this?
+rep 5 times kk![]()

Well say i had the upload page on sever 1, but i want the images to go to sever 2, how would i go about doing this?
+rep 5 times kk![]()
Usually I suppose you would have to point the upload form to the PHP File on the other server, ensuring the folder you want the files to go into have the correct permissions.
the upload form has to be on sever 1.
Why don't you have the upload on server 1 upload images to a folder on server 1. Then on server 2 use file_get_contents() to grab the images or files from that particular folder?
Back for a while.
Thats a fairly gooooood idea actually, Would it be easy to code dya think?
Ross
Shouldn't be too hard. Or of course you can just have something like this:
Server 1:
Server 2:HTML Code:<form method="post" action="www.server2.com/upload.php" enctype="multipart/form-data" /> <input type="file" name="file" /> <input type="submit" name="submit" value="Upload" /> </form>
PHP Code:<?php
// handles all data from server 1 and uploads it to server 2
?>
Back for a while.
hmm, nah i think your first idea was fairly decent...
Right now im confused, would file_get_contents() go in the folder where i want the images to go in? what would i name that file too n the coding in that file?
Ross
Basically you'd do something like this. Somebody correct me if I am wrong.
Now I'm not sure if that works but yeah, try.PHP Code:<?php
$file = "index.php";
$files = file_get_contents('url');
file_put_contents($file, $files);
?>
Back for a while.
Want to hide these adverts? Register an account for free!