21. $p = explode("?",$link); 22. $p1 = strlen($p[0]); 23. $p2 = strlen($p[1]);
if (isset($p[1])) $p2 = strlen($p[1]);
<?php $fp = fsockopen("www.yandex.ru", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host: www.yandex.ru\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?>
$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); } ?>
$header = "POST /passport?mode=auth HTTP/1.0\r\n" . $header .="Host: passport.yandex.ru\r\n". $header .="Content-Type: application/x-www-form-urlencoded\r\n". $header .="Content-Length: $length\r\n\r\n".
header('Location...');