@@ -279,7 +279,7 @@ function getCurrentPublicIPv4()
279279
280280 outputStdout ('Getting IPv4 address from API. ' );
281281
282- $ url = ' https://api.ipify.org ' ;
282+ $ url = IPV4_ADDRESS_PROVIDER ;
283283 $ ch = initializeCurlHandlerGetIP ($ url );
284284 $ publicIP = trim (curl_exec ($ ch ));
285285
@@ -292,8 +292,8 @@ function getCurrentPublicIPv4()
292292 }
293293
294294 if (!isIPV4Valid ($ publicIP ) || $ publicIP === false ) {
295- outputWarning (" https://api.ipify.org didn't return a valid IPv4 address (Try $ retryCount / $ retryLimit). Trying fallback API https://ipv4.seeip.org " );
296- $ url = ' https://ipv4.seeip.org ' ;
295+ outputWarning (IPV4_ADDRESS_PROVIDER . " didn't return a valid IPv4 address (Try $ retryCount / $ retryLimit). Trying fallback API " . IPV4_ADDRESS_PROVIDER_FALLBACK );
296+ $ url = IPV4_ADDRESS_PROVIDER_FALLBACK ;
297297 $ ch = initializeCurlHandlerGetIP ($ url );
298298 $ publicIP = trim (curl_exec ($ ch ));
299299 if (!wasCurlSuccessful ($ ch ) || !isIPV4Valid ($ publicIP )) {
@@ -326,7 +326,7 @@ function getCurrentPublicIPv6()
326326
327327 outputStdout ('Getting IPv6 address from API. ' );
328328
329- $ url = ' https://ipv6.seeip.org ' ;
329+ $ url = IPV6_ADDRESS_PROVIDER ;
330330 $ ch = initializeCurlHandlerGetIP ($ url );
331331 $ publicIP = trim (curl_exec ($ ch ));
332332
@@ -339,8 +339,8 @@ function getCurrentPublicIPv6()
339339 }
340340
341341 if (!isIPV6Valid ($ publicIP ) || $ publicIP === false ) {
342- outputWarning (" https://ipv6.seeip.org didn't return a valid IPv6 address (Try $ retryCount / $ retryLimit). Trying fallback API https://v6.ident.me/ " );
343- $ url = ' https://v6.ident.me/ ' ;
342+ outputWarning (IPV6_ADDRESS_PROVIDER . " didn't return a valid IPv6 address (Try $ retryCount / $ retryLimit). Trying fallback API " . IPV6_ADDRESS_PROVIDER_FALLBACK );
343+ $ url = IPV6_ADDRESS_PROVIDER_FALLBACK ;
344344 $ ch = initializeCurlHandlerGetIP ($ url );
345345 $ publicIP = trim (curl_exec ($ ch ));
346346 if (!wasCurlSuccessful ($ ch ) || !isIPV6Valid ($ publicIP )) {
0 commit comments