$str
=
"
username=test&password=123
"
$fp = fsockopen ( " www.123cha.com " , 80 );
fputs ( $fp , " POST /postal/index.php HTTP/1.1 " );
fputs ( $fp , " Host:www.123cha.com " );
fputs ( $fp , " Content-Type:application/x-www-form-urlencoded " );
fputs ( $fp , " Content-Length: " . strlen ( $str ) . " " );
fputs ( $fp , $str . " " );
while ( ! feof ( $fp ))
{
$http_response .= fgets ( $fp , 128 );
}
fclose ( $fp );
$fp = fsockopen ( " www.123cha.com " , 80 );
fputs ( $fp , " POST /postal/index.php HTTP/1.1 " );
fputs ( $fp , " Host:www.123cha.com " );
fputs ( $fp , " Content-Type:application/x-www-form-urlencoded " );
fputs ( $fp , " Content-Length: " . strlen ( $str ) . " " );
fputs ( $fp , $str . " " );
while ( ! feof ( $fp ))
{
$http_response .= fgets ( $fp , 128 );
}
fclose ( $fp );