• Resolved mmslko

    (@mujtaba677)


    Please see when i executed these code on a page, this is the result on live website. So visitor data is no where and its gives only my server data which is actually through cloudflare.

    I copy codes from the sample you mentioned on your plugin page.


    // Detect visitor IP automatically
    $data1 = ip2location_get_vars();
    $data1 = json_decode($data1);

    echo $data1->ipAddress;
    echo $data1->countryCode;
    echo $data1->countryName
    ;
    $data->cityName
    ;

    echo $_SERVER[‘IP2LOCATION_IP_ADDRESS’];

    ——————————

    Display on page this information when opening the page with above codes, i am based in the middle east.

    this is the information xxx i change it.

    141.xxx.68.226FRFrance141.xxx.68.226

    =============

    How to get visitor country Code not my server codes or cloudfare IPs.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Your plugin giving server address and not visitor’ is closed to new replies.