logo SnippetVamp

php 112astuce 108fonctions 91css 75javascript 71html 54fichiers 32jquery 27texte 20securite 18bootstrap 14graphisme 14parser 13debug 11python 11responsive 9pluXML 7crossbrowser 5evenements 5vanilla 5ajax 4conversion 3form 3auto_ 2bash 2dothtaccess 2lib 2markdown 2mobile 2promise 2effets 1erreurs 1fallback 1filter 1mail 1social 1
SnippetVamp 3.1d - 2026 - GNU GPL - FAQ
1 - Récupérer l'IP réelle du user
function getRealIpAddr()  
{  
    if (!emptyempty($_SERVER['HTTP_CLIENT_IP']))  
    {  
        $ip=$_SERVER['HTTP_CLIENT_IP'];  
    }  
    elseif (!emptyempty($_SERVER['HTTP_X_FORWARDED_FOR']))  
    //to check ip is pass from proxy  
    {  
        $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];  
    }  
    else  
    {  
        $ip=$_SERVER['REMOTE_ADDR'];  
    }  
    return $ip;  
}  
			
php fonctions securite
http://webdeveloperplus.com/php/21-really-useful-handy-php-code-snippets/
public - 16/04/2013 - Add to pack - texte seul - permalink