How to integrate yii2 with third party api(Hosted on different Server)

Im trying to get the data from the api server, not making REST API using yii2

yii has an extension called yii2-httpclient a good starting point, you can format your requests to json,xml and whole lot of other goodies

$client = new Client();

$apiRequest => $client->get(''),

$response = $client->send($apiRequest);

Update: please note above example assumes you have yii2-httpclient installed and loaded, composer is your friend if you need to install yii2-httpclient

got the problem "Maximum execution time of 30 seconds exceeded"