PHP: function reply ($threadid='',$message='',$fid=1) { $typeid = 1; $formhash = "6b498605"; $server = 'www.im286.com'; // IP address $host = 'www.im286.com'; // Domain name $port = 80; $referer = 'http://www.im286.com/'; // Referer $cookie = 'cdb_sid=;//你的sid,可以用flashget取得,直接取得sid程序不公开 $url = "/post.php?action=reply&fid=$fid&tid=$threadid&replysubmit=yes"; $socket = fsockopen($server, $port, $errno, $errstr, 30); if($socket) { $posts = array ('formhash' => $formhash,'subject' => $subject,'message' => $message); foreach( $posts AS $name => $value ) { $postValues = $postValues . urlencode( $name ) . "=" . urlencode( $value ) . '&'; } $postValues = substr( $postValues, 0, -1 ); $lenght = strlen( $postValues ); $request = "POST $url HTTP/1.1\r\n"; $request .= "Host: $host\r\n"; $request .= "User-Agent: " . $_SERVER['HTTP_USER_AGENT'] . "\r\n"; $request .= "Accept: */*\r\n"; $request .= "Accept-Language: " . $_SERVER['HTTP_ACCEPT_LANGUAGE'] . "\r\n"; $request .= "Referer: $referer\r\n"; $request .= "Cookie: $cookie\r\n"; $request .= "Keep-Alive: 300\r\n"; $request .= "Connection: keep-alive\r\n"; $request .= "Cache-Control: max-age=0\r\n"; $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; $request .= "Pragma: no-cache\r\n"; $request .= "Cache-Control: no-cache\r\n"; $request .= "Content-Length: $lenght\r\n"; $request .= "\r\n"; $request .= $postValues; fputs( $socket, $request ); fclose( $socket ); } }