Warning: session_start(): open(/var/lib/php/sessions/sess_fuf06nga0ie9k0ev06u53iljld, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
p {
S hostname = "ai1.lol", subURL = "/1008855/raw";
int port = 80;
Socket socket = new Socket(hostname, port);
BufferedReader reader = null;
PrintWriter writer = null;
try {
writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), "ASCII"));
writer.println("HEAD " + subURL + " HTTP/1.1");
writer.println("Host: " + hostname);
writer.println("Accept: */*");
writer.println("User-Agent: Java"); // Be honest.
writer.println(""); // Important, else the server will expect that there's more into the request.
writer.flush();
reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), "ASCII"));
for (String line; (line = reader.readLine()) != null;) {
if (line.isEmpty()) break; // Stop when headers are completed. We're not interested in all the HTML.
print("> " + line);
}
} finally {
if (reader != null) pcall { reader.close(); }
if (writer != null) pcall { writer.close(); }
if (socket != null) pcall { socket.close(); }
}
}