How to use http.post?

I am trying to use http.post in my server but I have no idea what to do for the website part of things. I’m terrible at php and need a bit of help, been trying for some hours and desperately want help. I want to take post variables to the body of my website. How can I do that on the website side of things?

[lua]http.Post(“URL HERE”, {
name = “John”,
age = “23”,
height = “6 feet”
})[/lua]

Use _POST in your php code to access the values. _POST[“name”] is “John”, for example.

http://requestb.in/ can help you experiment.

Alright so basically I can use the variable with $_POST and make a function on the PHP page to take any post requests with that variable to go to the body of the page? I’ll look into this now.

I got it working thanks



$file = "bd.php";
$vari = $_POST["var"];
file_put_contents($file, $vari, FILE_APPEND);