$out = "POST $url HTTP/1.1\r\n";
$out .= "Host: $host\r\n";
$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
$out .= "Content-Length: ".strlen($data)."\r\n";
$out .= "Referer: http://".$host.$url."\r\n";
$out .= "X-CSRF-TOKEN:csrf_token()\r\n";
$out .= "Cookie: username=admin;uid=200\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
这些信息,每一行都打印出来看