Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php header x forwarder for

public function getClientIP(){       
     if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)){
            return  $_SERVER["HTTP_X_FORWARDED_FOR"];  
     }else if (array_key_exists('REMOTE_ADDR', $_SERVER)) { 
            return $_SERVER["REMOTE_ADDR"]; 
     }else if (array_key_exists('HTTP_CLIENT_IP', $_SERVER)) {
            return $_SERVER["HTTP_CLIENT_IP"]; 
     } 

     return '';
}
Comment

PREVIOUS NEXT
Code Example
Php :: how to write orderby in join query with where clause in codeigniter 
Php :: laravel route optional parameter 
Php :: laravel image store 
Php :: foreign key cosntraint laravel 
Php :: switch php versions 
Php :: how to execute php function on button click 
Php :: ci constructor 
Php :: .htaccess Prevent access to php.ini 
Php :: laravel eloquent update 
Php :: laravel 8 websockets 
Php :: create curl api request php with para 
Php :: laravel validate form data unique 
Php :: php foreach loop first element 
Php :: {{count laravel 
Php :: seprate day and year from laravel to timestamp 
Php :: laravel request has 
Php :: php webpage to string 
Php :: Difference in seconds between datetime 
Php :: laravel reload relationship 
Php :: export mysql data to word in php 
Php :: PHP str_repeat — Repeat a string 
Php :: script inside php 
Php :: read pdf text php 
Php :: php array_fill 
Php :: laravel documentation updateOrCreate 
Php :: Getting the closest string match using php 
Php :: material icons flutter list 
Php :: php get first element of iterator class 
Php :: wordpress args 
Php :: php injection 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =