Forum Moderators: coopster
You will need to track rapidshare and other free file hosting site's headers; for which you can use different softwares e.g LiveHTTPheader for Firefox.
Then you will use php-cURL to create artificial process similar to third party site and send your files.
how do they distribute files to many servers at a single click
You can distribute files to many servers in a single click by using processes on the server side. cURL is one tool that was mentioned. Basically you are going to accept a file upload and then distribute it via socket connections on your server that accepted the file upload.
did you study cURL manual? you will find lots of information to proceed from there. Google PHP CURL LIBRARY; follow the second link on the results; you will definitely find file uploading with cURL examples on this site, I had posted one myself a while ago but dont have its exact url so search it... also try joining their mailing list and ask wherever you are stuck..
index.html
<form action="upload.php" method="post">
<h1>Upload</h1><br>
<table border="0"><tr><td>
<tr><td>File: <input type="file" name="upload"></td></tr></td></tr><tr><td><tr><td><input type="submit" value="Upload"></td></tr></table>
I don't have the time to make the php, but here's one from w3schools.
upload.php
<?php
if (($_FILES["file"]["type"] == "image/gif")
¦¦ ($_FILES["file"]["type"] == "image/jpeg")
¦¦ ($_FILES["file"]["type"] == "image/pjpeg")
&& ($_FILES["file"]["size"] < 20000))
{
if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
echo "Type: " . $_FILES["file"]["type"] . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";if (file_exists("upload/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"upload/" . $_FILES["file"]["name"]);
echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
}
}
}
else
{
echo "Invalid file";
}
?>