Jump to content

Uploading images with php from webserver A to Server B


00stuff

Recommended Posts

Hi guys, I have a website that I created and it has the ability to upload images to a directory that is located in the same web server, but there are so many images now and it is taking too much space. What I am trying to do now is for the script to upload the images to a different server but don't want to run FTP on that second server if I don't need to. Does anyone know how I can do that?

 

Thank you guys in advanced,

Well, I know it has to be uploaded with FTP, but I don't want to run an FTP server on the server that will contain the images and the server receiving the images is not a web server either. Just a computer with its own ip. Any way to do that? This is what I was doing.

// get file attributes!!!!!
				$photoname1 = $_FILES['img_file']['name'];
				$tmp_name1 = $_FILES['img_file']['tmp_name'];

				$random1 = rand(1, 1000000);







				if ($photoname1)
				{
				// start upload process
				$photoname1 = $report_id . "_" . $random1 . "_" . $photoname1;
				// $location1 = "record_images/$photoname1";
				$location1 = "http://192.168.1.3/qcapp_images/$photoname1";
				move_uploaded_file($tmp_name1,$location1);
				}
				else
				{
				$location1 = "";
				}

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.