mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-10-11 14:37:12 +00:00
[Web] load public ip on click and add curl timeout
This commit is contained in:
1 parent
3f1a5af88b
commit
9727e4084f
5 files changed
+50
-17
No files matched your search
@@ -1548,10 +1548,14 @@ if (isset($_GET['query'])) {
|
||||
curl_setopt($curl, CURLOPT_URL, 'http://ipv4.mailcow.email');
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_POST, 0);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||
$ipv4 = curl_exec($curl);
|
||||
curl_setopt($curl, CURLOPT_URL, 'http://ipv6.mailcow.email');
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_POST, 0);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||
$ipv6 = curl_exec($curl);
|
||||
$ips = array(
|
||||
"ipv4" => $ipv4,
|
||||
|
||||
Reference in new issue
Block a user