http.Post
Örnek
PHP'de bir dosya yazın ve bunu Lua'dan çağırın. Aşağıdaki çıktı konsola değil, dosyaya yazılır.
<?php
$p = $_POST["p"];
$a = $_POST["a"];
$f = fopen("write.html", "w");
fwrite($f, "This is a test. $p $a\n");
fclose($f);
?>
http.Post( "http://localhost/post.php", { p = "Gmod", a = "Test" },
-- onSuccess fonksiyonu
function( body, length, headers, code )
print( "Bitti!" )
end,
-- onFailure fonksiyonu
function( message )
print( message )
end
)
Çıktı:
This is a test. Gmod Test
Tüm sunucular · GmodTR Launcher · Rehber · GMod Wiki · GmodTR nedir? · Sunucu ekle · Discord