#!/usr/bin/env php /dev/null | grep -v could', $ipv6 ? '-6' : null ); $ip = trim(shell_exec($command)); if (empty($ip)) { $command = sprintf( 'dig +short %s TXT o-o.myaddr.l.google.com @ns1.google.com 2>/dev/null | grep -v could', $ipv6 ? '-6' : '-4' ); $ip = trim(shell_exec($command)); $ip = trim($ip, '"'); } if (empty($ip)) { $command = sprintf( 'curl %s ifconfig.co 2>/dev/null', $ipv6 ? '-6' : '-4' ); $ip = trim(shell_exec($command)); } if (empty($ip)) { die; } if (getenv('BLOCK_BUTTON') === '1') { shell_exec(' export DISPLAY=:0 printf '.escapeshellarg($ip).' | xclip -sel clip notify-send "Valeur copiƩe" '.escapeshellarg($ip).' '); } $fullText = pspan($iface, '#ccc', '#222').pspan($ip, '#ddd', '#000'); echo block( 'ip_wan', [ 'full_text' => $fullText, 'separator' => false, 'separator_block_width' => 0, ] );