Kód: Vybrať všetko
Fatal error: Function name must be a string in /home/ftpsite/domczo.profitux.cz/kuk2.php on line 65Kód: Vybrať všetko
$print($response);Nastavil som prava 777, ziadna zmena.
Kód: Vybrať všetko
Fatal error: Function name must be a string in /home/ftpsite/domczo.profitux.cz/kuk2.php on line 65Kód: Vybrať všetko
$print($response);Kód: Vybrať všetko
$printKód: Vybrať všetko
http_post("http://ul23.rapidshare.com/files/2024261/car-rzr.part01.rar", "ul23.rapidshare.com", "dl.start=Free");Kód: Vybrať všetko
<body onload=abc1.submit();>
<form name="abc1" action="http://ul23.rapidshare.com/files/2024261/car-rzr.part01.rar" method="post">
<input type="hidden" name="dl.start" value="Free">
</form>
</body>Kód: Vybrať všetko
<?php
$host = "www.adresa.sk";
$port = 80;
$path = "/"; //or .dll, etc. for authnet, etc.
//you will need to setup an array of fields to post with
//then create the post string
$formdata = array ( "nieco" => "Niecoooo");
//build the post string
foreach($formdata AS $key => $val){
$poststring .= urlencode($key) . "=" . urlencode($val) . "&";
}
// strip off trailing ampersand
$poststring = substr($poststring, 0, -1);
$fp = fsockopen("".$host, $port, $errno, $errstr, $timeout = 30);
if(!$fp){
//error tell us
echo "$errstr ($errno)\n";
}else{
//send the server request
fputs($fp, "POST $path HTTP/1.1\r\n");
fputs($fp, "Host: $host\r\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
fputs($fp, "Content-length: ".strlen($poststring)."\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, $poststring . "\r\n\r\n");
//loop through the response from the server
while(!feof($fp)) {
echo fgets($fp, 4096);
}
//close fp - we are done with it
fclose($fp);
}
?>Kód: Vybrať všetko
<?php
$header = "";
$response = "";
function http_post($host, $path, $postdata)
{
global $header, $response;
// connect
if (!($request=fsockopen($host, 80, $errno, $errstr, 10))) {
exit($errstr);
} else {
$post = "POST $path HTTP/1.1\r\n";
$post .= "Host: $host\r\n";
$post .= "User-Agent: PHP Script\r\n";
$post .= "Content-Type: application/x-www-form-urlencoded\r\n";
$post .= "Content-Length: ".strlen($postdata)."\r\n";
$post .= "Connection: close\r\n\r\n";
$post .= $postdata;
fwrite($request, $post);
do {
$header .= fread($request, 1);
} while (!preg_match('/\\r\\n\\r\\n$/',$header));
if (preg_match('/Transfer\\-Encoding:\\s+chunked\\r\\n/',$header)) {
do {
$byte = "";
$chunk_size = "";
do {
$chunk_size .= $byte;
$byte=fread($request, 1);
} while ($byte != "\\r");
fread($request, 1);
$chunk_size = hexdec($chunk_size);
$response .= fread($request,$chunk_size);
fread($request, 2);
} while ($chunk_size);
} else {
if (preg_match('/Content\\-Length:\\s+([0-9]*)\\r\\n/', $header, $matches)) {
$size = $matches[1];
$response = "";
while (!feof($request) && $size > 0) {
$response .= fread($request, min(4096, $size));
$size -= 4096;
}
} else {
while (!feof($request)) $response .= fread($request, 4096);
}
}
fclose($request);
}
}
http_post("ul23.rapidshare.com", "/files/2024261/car-rzr.part01.rar", "dl.start=Free");
print($header);
print($response);
?>