Pubblicato il 02/05/2022
La seguente funzione restituisce l'indirizzo ip di un visitatore.
function get_client_ip() { $ipaddress = ''; if (getenv('HTTP_CLIENT_IP')) $ipaddress = getenv('HTTP_CLIENT_IP'); else if(getenv('HTTP_X_FORWARDED_FOR')) $ipaddress = getenv('HTTP_X_FORWARDED_FOR'); else if(getenv('HTTP_X_FORWARDED')) $ipaddress = getenv('HTTP_X_FORWARDED'); else if(getenv('HTTP_FORWARDED_FOR')) $ipaddress = getenv('HTTP_FORWARDED_FOR'); else if(getenv('HTTP_FORWARDED')) $ipaddress = getenv('HTTP_FORWARDED'); else if(getenv('REMOTE_ADDR')) $ipaddress = getenv('REMOTE_ADDR'); else $ipaddress = 'UNKNOWN'; return $ipaddress; }
Categoria: PHP
Condividi sui Social:
La seguente funzione permette di creare una url partendo da una stringa testuale, restituisce una stringa il piu possibile SEO friendly...
PHP, SEO
Orion, una raccolta di icone per utilizzo commerciale, scaricabili in SVG....
ICONE, IMMAGINI
Una semplice classe PHP per gestire le diverse classi di utenza memorizzando il login nei cookie....
PHP, SCRIPT
Come ottimizzare una pagina web per i motori di ricerca, le impostazioni necessarie...
SEO