getting a suitable server for an upload script

From: Date: Sat, 15 Jun 2002 11:17:51 +0000
Subject: getting a suitable server for an upload script
Groups: php.dev 
Request: Send a blank email to php-dev+get-85235@lists.php.net to get a copy of this message
hi i am creating a file upload script which will upload , insert into the db and then ftp the file to a suitable server , depending on the file size limit and how much space is left on the server , how could i check if the filesize is between a range of values for the servers and choose the right one $filesize = round($file->getProp('size')/1000); //uploaded filesize while ($servers = $result2->fetchRow(DB_FETCHMODE_ASSOC,$i++)) { $file_limit = $servers["file_limit"]; $ftpserver = $servers["server"]; if ($filesize < $file_limit) { echo "$ftpserver<br>$file_limit<br>";} //else if (($filesize > $file_limit) and ($filesize < 1000)) {echo "$ftpserver<br>$file_limit";} //else if ($filesize > $file_limit) { echo "$ftpserver<br>$file_limit<br>";} } i am using this within an upload loop to upload each file , i dont think its right though

« previous php.dev (#85235) next »