How to create WebService on Linux server (eg GoDaddy)

0

I am currently finding a Linux hosting,

Which I can create MySql databases,

Now I find the need for my Android application, you can consume this data from the base through a WebService, it could be an Http Post request in Json format,

if I create the typical php script that returns me x data for example

 <?php
$myObj->name = "John";
$myObj->age = 30;
$myObj->city = "New York";

$myJSON = json_encode($myObj);

echo $myJSON;
?>

I would find the following data from postman

Now I would like to be able to send a json from a post from my post, and in the server to be able to do x task according to what I send, for example, to say something the following Json

{
            "user":"411331216",
            "role":"TEST"
}

what would the php script be like to get this data? Thanks again

    
asked by Bruno Sosa Fast Tag 03.06.2018 в 20:47
source

0 answers