I am trying to get the result of one custom API in another custom API. Please help me with the same.
You can use curl or zend_client to call custom API from another API.
Note: This method is not recommended.
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = json_decode(curl_exec($ch));