Plugin Directory

Changeset 2932200


Ignore:
Timestamp:
06/29/2023 11:00:41 AM (3 years ago)
Author:
wiredmindshelp
Message:

Updated from GitLab CI 1.5.5

Location:
ip2content/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ip2content/trunk/Http/Services/IP2Company/IPResolver.php

    r2864341 r2932200  
    88{
    99    public function resolveClientIP(): string
    10     {
    11         if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
    12             return $_SERVER['HTTP_CLIENT_IP'];
     10{
     11    if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
     12        return $_SERVER['HTTP_CLIENT_IP'];
     13    }
     14   
     15    if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
     16        $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
     17        foreach ($ips as $ip) {
     18            $ip = trim($ip);
     19            if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
     20                return $ip;
     21            }
    1322        }
    14 
    15         if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    16             return $_SERVER['HTTP_X_FORWARDED_FOR'];
    17         }
    18 
    19         return $_SERVER['REMOTE_ADDR'];
    2023    }
     24   
     25    return $_SERVER['REMOTE_ADDR'];
    2126}
     27}
  • ip2content/trunk/README.txt

    r2864341 r2932200  
    66Tested up to: 6.1
    77Requires PHP: 7.4
    8 Stable tag: 1.5.45
     8Stable tag: 1.5.5
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1212
    1313
    14 Dynamic Content for Websites & integration of the Wiredminds LeadLab trackingcode.
     14Dynamic Content for Websites & integration of the WiredMinds LeadLab trackingcode.
    1515
    1616== Description ==
    17 EN: This Plugin will change content of websites in realtime in dependence of different campaigns, branches, company names, company sizes, revenue classes and geolocations of the website visitor. The function for the dynamic content for UTM Parameter (campaigns) is free available.
    18 DE: Dieses Plugin ändert den Inhalt von Webseiten in Echtzeit in Abhängigkeit von verschiedenen Kampagnen, Branchen, Firmennamen, Firmengrößen, Umsatzklassen und Geolocations der Webseitenbesucher. Die Funktion für den dynamischen Inhalt für UTM Parameter (Kampagnen) ist frei verfügbar.
     17This Plugin will change content of websites in realtime in dependence of different campaigns, branches, company names, company sizes, revenue classes and geolocations of the website visitor. The function for the dynamic content for UTM Parameter (campaigns) is free available.
    1918
    2019
Note: See TracChangeset for help on using the changeset viewer.