@@ -297,9 +297,9 @@ function getCurrentPublicIPv4()
297297 return $ providedIPv4 ;
298298 }
299299
300- outputStdout ('Getting IPv4 address from API . ' );
300+ outputStdout ('Getting IPv4 address from ' . IPV4_ADDRESS_URL . ' . ' );
301301
302- $ url = ' https://api.ipify.org ' ;
302+ $ url = IPV4_ADDRESS_URL ;
303303 $ ch = initializeCurlHandlerGetIP ($ url );
304304 $ publicIP = trim (curl_exec ($ ch ));
305305
@@ -312,8 +312,8 @@ function getCurrentPublicIPv4()
312312 }
313313
314314 if (!isIPV4Valid ($ publicIP ) || $ publicIP === false ) {
315- outputWarning (" https://api.ipify.org didn't return a valid IPv4 address (Try $ retryCount / $ retryLimit). Trying fallback API https://ipv4.seeip.org " );
316- $ url = ' https://ipv4.seeip.org ' ;
315+ outputWarning (IPV4_ADDRESS_URL . " didn't return a valid IPv4 address (Try $ retryCount / $ retryLimit). Trying fallback " . IPV4_ADDRESS_URL_FALLBACK );
316+ $ url = IPV4_ADDRESS_URL_FALLBACK ;
317317 $ ch = initializeCurlHandlerGetIP ($ url );
318318 $ publicIP = trim (curl_exec ($ ch ));
319319 if (!wasCurlSuccessful ($ ch ) || !isIPV4Valid ($ publicIP )) {
@@ -344,9 +344,9 @@ function getCurrentPublicIPv6()
344344 return $ providedIPv6 ;
345345 }
346346
347- outputStdout ('Getting IPv6 address from API . ' );
347+ outputStdout ('Getting IPv6 address from ' . IPV6_ADDRESS_URL . ' . ' );
348348
349- $ url = ' https://ipv6.seeip.org ' ;
349+ $ url = IPV6_ADDRESS_URL ;
350350 $ ch = initializeCurlHandlerGetIP ($ url );
351351 $ publicIP = trim (curl_exec ($ ch ));
352352
@@ -359,8 +359,8 @@ function getCurrentPublicIPv6()
359359 }
360360
361361 if (!isIPV6Valid ($ publicIP ) || $ publicIP === false ) {
362- outputWarning (" https://ipv6.seeip.org didn't return a valid IPv6 address (Try $ retryCount / $ retryLimit). Trying fallback API https://v6.ident.me/ " );
363- $ url = ' https://v6.ident.me/ ' ;
362+ outputWarning (IPV6_ADDRESS_URL . " didn't return a valid IPv6 address (Try $ retryCount / $ retryLimit). Trying fallback " . IPV6_ADDRESS_URL_FALLBACK );
363+ $ url = IPV6_ADDRESS_URL_FALLBACK ;
364364 $ ch = initializeCurlHandlerGetIP ($ url );
365365 $ publicIP = trim (curl_exec ($ ch ));
366366 if (!wasCurlSuccessful ($ ch ) || !isIPV6Valid ($ publicIP )) {
0 commit comments