From 7f7707d8273152ec95a8e1a9e42a0c9588492e34 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Mon, 7 May 2018 22:57:08 +0800 Subject: [PATCH] Force ipv4 resolv for calls to google maps api #113 --- src/Service/MapTools.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Service/MapTools.php b/src/Service/MapTools.php index 693b3c21..aa38cd6d 100644 --- a/src/Service/MapTools.php +++ b/src/Service/MapTools.php @@ -52,7 +52,12 @@ class MapTools // query google maps api - $res = $client->request('GET', $maps_url, ['query' => $gmaps_params]); + $res = $client->request('GET', $maps_url, [ + 'query' => $gmaps_params, + 'curl' => [ + CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4 + ], + ]); return $res->getBody(); }