Name | Type | Required | Data |
---|---|---|---|
username | Text varchar(50) | YES | Username |
password | Text varchar(100) | YES | Password |
user_token | Text | YES | Token provided |
$post = [
'username' => '',
'password' => '',
'user_token' => '',
];
$ch = curl_init('https://api.rrr.lt/get/car_brands');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = json_decode(curl_exec($ch));
curl_close($ch);
{ "list": [ { "id": "120", "name": "AC" }, { "id": "119", "name": "Acura" }, { "id": "38", "name": "Aixam" }, { "id": "39", "name": "Alfa" }, ... ], "msg": "OK", "status_code": "R200" }