function PostToHost($host, $path, $referer, $data_to_send) {
$fp = fsockopen($host, 443);
printf("Open!\n");
fputs($fp, "POST $path HTTP/1.1\r\n");
fputs($fp, "Host: $host\r\n");
fputs($fp, "Referer: $referer\r\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
fputs($fp, "Content-length: ". strlen($data_to_send) ."\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, $data_to_send);
while(!feof($fp)) {
$res .= fgets($fp, 128);
}
printf("Done!\n");
fclose($fp);
return $res;
}
$data = "username=DEINUSERNAME&password=DEINPASSWORT";
$x = PostToHost(
"ssl.rapidshare.com",
"/cgi-bin/collectorszone.cgi",
"http://DEINEDOMAIN/DEINSCRIPT.php",
$data
);