From b126d918b004439a6cd29d2f4852686188ad3d63 Mon Sep 17 00:00:00 2001 From: mdPlusPlus Date: Sat, 28 Jan 2023 01:54:46 +0100 Subject: [PATCH] Remove http://13.233.251.36:8081 from $known_servers, offline --- php/fetch-servers.php | 2 +- php/utils/server-utils.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/php/fetch-servers.php b/php/fetch-servers.php index 5d0e061..8b51694 100644 --- a/php/fetch-servers.php +++ b/php/fetch-servers.php @@ -26,7 +26,7 @@ * Ideally this shouldn't be necessary, but it is for now */ $known_servers = array( - "http://13.233.251.36:8081", + // "http://13.233.251.36:8081", // found via shodan.io, but now offline "https://open.getsession.org" ); diff --git a/php/utils/server-utils.php b/php/utils/server-utils.php index 5a242ca..8623cf7 100644 --- a/php/utils/server-utils.php +++ b/php/utils/server-utils.php @@ -38,9 +38,9 @@ curl_exec($ch); $retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); -// echo($url . " is " . $retcode . PHP_EOL); if ($retcode != 0) { +// echo($url . " is " . $retcode . PHP_EOL); return true; } else { @@ -63,9 +63,9 @@ curl_exec($ch); $retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); -// echo($url . " is " . $retcode . PHP_EOL); if ($retcode == 200) { +// echo($url . " is " . $retcode . PHP_EOL); return true; } else { @@ -83,6 +83,7 @@ $timeout = 3; // can't take longer than X seconds for the whole curl process $sleep = 2; // sleep between tries in seconds $retries = 120; +// $retries = 10; // debug // takes at most ($timeout + $sleep) * retries seceonds // 3 + 2 * 150 = 5 * 120 = 600s = 10m