Track Order

"https://app.shipsy.in/api/client/integration/consignment/track?reference_number=$trackingno", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "Authorization: Basic ZjE1NmY2ZTYwMzEzYWRlNmM2NmJjNWNmYjA3YzEwOg==", "Content-Type: application/json" ), )); $response = curl_exec($curl); curl_close($curl); $responsedata = json_decode($response); ?>
error->message)){ foreach ($responsedata->events as $data){ switch ($data->type) { case "softdata_upload": echo '
Order Created
'; break; case "pickup_scheduled": echo '
Order Under Process
'; break; case "pickup_awaited": echo '
Order Under Process
'; break; case "pickup_completed": echo '
Order Picked
'; break; case "not_picked_up": echo '
We Could not Pick the Order
'; break; case "cancelled": echo '
Order Had Been Canceled
'; break; case "outscan_at_hub": echo '
Order Reached Hub
'; break; case "inscan_at_hub": echo '
Preparing the Order for Delivery
'; break; case "reachedathub": echo '
Preparing the Order for Delivery
'; break; case "cancelled": echo '
Order Had Been Canceled
'; break; case "accept": echo '
Order Out for Delivery
'; break; case "delivered": echo '
Delivered
'; break; case "attempted": echo '
Attempted
'; break; } } } else{ echo '
'.$responsedata->error->message.'
'; } ?>