
17.06.2007, 09:10
|
|
Познающий
Регистрация: 21.05.2007
Сообщений: 61
С нами:
9986942
Репутация:
145
|
|
PHP код:
$sock = fsockopen( "site.com", 80, $errno, $errstr, 10);
if ( ! $sock )
{
die ( "$errstr ($errno)" );
}
else
{
$content = "w=&login=1182010500&e91db3a=mylogin&edfa0d9=mypassword&ee0afeb=";
$content_strlen = strlen ( $content );
$header = "POST http://site.com/some.php HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Host: site.com\r\n";
$header .= "Content-Length: $content_strlen\r\n";
$header .= "\r\n";
$header .= $content;
fwrite( $sock, $header );
while ( ! feof ( $sock ) )
echo fgets($fp, 128);
fclose( $sock );
}
|
|
|