i need script to upload to many free file hosting servers Like http://www.shareonall.com please Help thanks
It's not a big deal. Your can use curl fuction to remotly upload single/multiple file through known ftp. I have already done this type of experiment various time. for example <?php // // A simple PHP/CURL FTP upload to a remote site // $ch = curl_init(); $localfile = "me-and-my-dog.jpg" . $fp = fopen ($localfile, "r"); // we upload a JPEG image curl_setopt($ch, CURLOPT_URL, "ftp://mynamw:mypassword@ftp.mysite.com/path/to/destination.jpg"); curl_setopt($ch, CURLOPT_UPLOAD, 1); curl_setopt($ch, CURLOPT_INFILE, $fp); // set size of the image, which isn't _mandatory_ but helps libcurl to do // extra error checking on the upload. curl_setopt($ch, CURLOPT_INFILESIZE, filesize($localfile)); $error = curl_exec ($ch); // check $error here to see if it did fine or not! curl_close ($ch); ?>
ull first need to understand the uploading sysem of the sites and then using curl transfer files from ur server to the uploading servers
for uploading a file just use this: //sample.html <form action="sendmail.php" method="post" name="f1" id="f1" enctype="multipart/form-data"> Upload image :<input name="fileatt" type="file"> <form> //sendmail.php <?php $uploadfile=""; $fileatt=$_FILES['fileatt']['tmp_name']; $fileatt_type = $_FILES['fileatt']['type']; $fileatt_name = $_FILES['fileatt']['name']; // code for check $ext = strrchr($_FILES['fileatt']['name'],'.'); if (($extlimit == "yes") && (!in_array($ext,$limitedext))) { echo("Wrong file extension. "); exit(); } if($fileatt_name!="") { $uploadfile=$cpath."resume/".$fileatt_name; if (($fileatt_type=="image/pjpeg") || ($fileatt_type=="image/jpeg") || ($fileatt_type=="image/gif")) { @move_uploaded_file($fileatt , $uploadfile) or die('Resume upload problem.'); } } echo $fileatt_name; ?>