<?php
$body = "submit=%8F%91%82%AB%8D%9E%82%DE&FROM=%66%75%73%69%61%73%61%6E&mail=sage&MESSAGE=Hello+world&bbs=tech&key=1232331701&time=1";
$length = strlen($body);
$head = "POST /test/bbs.cgi HTTP/1.1\r\nHost: pc11.2ch.net\r\nUser-Agent: monazilla/1.00\r\n".
"Referer:
http://pc11.2ch.net/test/read.cgi/tech/1232331701/l50\r\nContent-Type: application/x-www-form-urlencoded\r\n";
$out = $head."Content-Length: ".$length."\r\n\r\n".$body;
$fp = fsockopen("pc11.2ch.net", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br>\n";exit;
}
fwrite($fp, $out);
$cookie = "Cookie: ";
while (!feof($fp)) {
$str = fgets($fp, 128);
if (strpos($str, "Set-Cookie: ") === 0) {
$str = str_replace("Set-Cookie: ", "", $str);
list($cook, ) = explode(";", $str);
$cookie .= $cook."; ";
}
}
fclose($fp);
$cookie .= "NAME=\"\"; MAIL=\"\"; suka=pontan\r\n";
$out = $head.$cookie."Content-Length: ".$length."\r\n\r\n".$body;
$fp = fsockopen("pc11.2ch.net", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br>\n";exit;
}
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
<?php
$body = "submit=%8F%91%82%AB%8D%9E%82%DE&FROM=%66%75%73%69%61%6E%61%73%61%6E&mail=sage&MESSAGE=Hello+world&bbs=tech&key=1232331701&time=1";
$length = strlen($body);
$head = "POST /test/bbs.cgi HTTP/1.1\r\nHost: pc11.2ch.net\r\nUser-Agent: monazilla/1.00\r\n".
"Referer:
http://pc11.2ch.net/test/read.cgi/tech/1232331701/l50\r\nContent-Type: application/x-www-form-urlencoded\r\n";
$out = $head."Content-Length: ".$length."\r\n\r\n".$body;
$fp = fsockopen("pc11.2ch.net", 80, $errno, $errstr, 30);
if (!$fp) {echo "$errstr ($errno)<br>\n";exit;}
fwrite($fp, $out);
$cookie = "Cookie: ";
while (!feof($fp)) {
$str = fgets($fp, 128);
if (strpos($str, "Set-Cookie: ") === 0) {
$str = str_replace("Set-Cookie: ", "", $str);
list($cook, ) = explode(";", $str);
$cookie .= $cook."; ";
}
}
fclose($fp);
$cookie .= "NAME=\"\"; MAIL=\"\"; suka=pontan\r\n";
$out = $head.$cookie."Content-Length: ".$length."\r\n\r\n".$body;
$fp = fsockopen("pc11.2ch.net", 80, $errno, $errstr, 30);
if (!$fp) {echo "$errstr ($errno)<br>\n";exit;}
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);