$post_data = "a=1&b=2&c=3&d=4"; $length = strlen ( $post_data ); $header = "POST http://forum.antichat.ru/index.php HTTP/1.0\r\n" . "Content-Type: application/x-www-form-urlencoded\r\n". "Host: forum.antichat.ru\r\n". "Content-Length: $length\r\n\r\n". $post_data;
<?php $fp = fsockopen("www.passport.yandex.ru", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $post_data = "retpath=http%3A%2F%2Fmail.yandex.ru%2F×tamp=1182979341312&login=zz&passwd=zz"; $length = strlen ( $post_data ); $header = "http://passport.yandex.ru/passport?mode=auth HTTP/1.0\r\n" . $header ="Content-Type: application/x-www-form-urlencoded\r\n". $header ="Host: passport.yandex.ru\r\n". $header ="Content-Length: $length\r\n\r\n". $post_data; fwrite($fp, $header); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?>