wip mv map_prof plugin outside docker

This commit is contained in:
asus
2024-02-04 12:00:33 +01:00
parent 22344ee724
commit 60f3fe0064
39 changed files with 21 additions and 10 deletions

View File

@@ -0,0 +1,18 @@
<?php
function mp_get_ip() {
$external_ip = "";
// curl with php :
// https://www.php.net/manual/en/function.curl-init.php
$ch = curl_init('https://ifconfig.me/ip');
// CURLOPT_RETURNTRANSFER is set to true, which means that cURL should return the response from the HTTP request as a string, rather than printing it to the screen
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$external_ip = curl_exec($ch);
//mp_console_log("ip:");
//mp_console_log($external_ip);
curl_close($ch);
return $external_ip;
}
?>