📜  使用 php 代码示例的用户位置

📅  最后修改于: 2022-03-11 14:54:35.204000             🧑  作者: Mango

代码示例1
geoplugin_countryName != null)
            {
                $result = array('ip' => $ip,
                                'continentCode' => $ip_data->geoplugin_continentCode,
                                'countryCode' => $ip_data->geoplugin_countryCode,
                                'countryName' => $ip_data->geoplugin_countryName,
                                );
            }
            return $result;
        }


        $visitor_details = visitor_country(); // Output Country name [Ex: United States]
        $country = $visitor_details['countryName'];