I got following Error when get Distance between two places in Laravel. i use guzzlehttp/guzzle package to get Google Map api response. i previously declare use GuzzleHttp\Client; How to solve this Issue.
Error : cURL error 7: Failed to connect to maps.googleapis.com port 443: Network is unreachable (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
$pickupaddress = urlencode($frmplace);
$deliveryaddress = urlencode($destplace);
$client = new GuzzleHttp\Client();
$disrequest = $client->get('https://maps.googleapis.com/maps/api/distancematrix/json?origins='.$pickupaddress.'&destinations='.$deliveryaddress.'&mode=driving&key=ASESdsfsdfsdfdsfdf')->getBody();
$disjsondecode = json_decode($disrequest);
$tripdistance = $disjsondecode->rows[0]->elements[0]->distance->text;