How to delete one element from firebase using PHP & Curl

Viewed 260

i want to delete one item from the following database:

enter image description here

But I didn't find any way to make a reference to -MDn__nRYb10hBAybUDM - item. The only code I found is:

curl_setopt_array($curl, array(
    CURLOPT_URL => FIREBASE_URL . "RiderOrdersList/" . $rider_id . "/PendingOrders/.json",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_POSTFIELDS => json_encode($curl_data2),
    CURLOPT_HTTPHEADER => array(
        "cache-control: no-cache",
        "content-type: application/json",
        "postman-token: 6b83e517-1eaf-2013-dab4-29b19c86e09e"
    ),
));

Can anyone help me out, please

0 Answers
Related