<?php function post($host, $script, $cont){ $respons=""; $postsock = fsockopen($host, 80, $errno, $errstr, 60); if (!$postsock) echo $errstr($errno); else { $head = "POST $script HTTP/1.1\r\n"; $head .= "Host: $host\r\n"; $head .= "Connection: close\r\n"; $head .= "Content-Type: application/x-www-form-urlencoded\r\n"; $head .= "Content-Length: " .strlen($cont). "\r\n"; $head .= "\r\n$cont\r\n"; fwrite($postsock, $head); while(!feof($postsock)){ $respons .= fgets($postsock, 1024); } fclose($postsock); } return $respons; } echo post('goldtown.ru', '/admin.php', 'user_login=admin&&password=pass');