Warning: session_start(): open(/var/lib/php/sessions/sess_k8e3g0c6fg06d2cvsvk0l2nvs1, 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
static S ntUpload(S title, S text) {
ret ntUpload(programID(), title, text);
}
static String ntUpload(String gummipw, String title, String text) {
ret ntUpload(gummipw, title, text, "");
}
static String ntUpload(String gummipw, String title, String text, String comment) ctex {
if (gummipw == null || gummipw.length() == 0)
throw new RuntimeException("Need gummi password.");
System.out.println("Uploading:");
System.out.println(" " + gummipw + " (" + text.length() + " chars)");
System.out.println(" " + title);
int displayLength = 40;
System.out.println(" " + (text.length() > displayLength ? quote(text.substring(0, displayLength)) + " [...]" : quote(text)));
URL url = new URL("http://tinybrain.de:8080/nt-int/add_snippet.php");
String postData = makePostData(
"gummipw", gummipw,
"text", text,
"title", title,
"comment", comment);
String contents = doPost(postData, url.openConnection(), url);
if (isInteger(contents)) {
long id = parseSnippetID(contents);
System.out.println("=> #" + id);
return "#" + id;
} else
throw new RuntimeException("Server error: " + contents);
}