راکت

کشور کاربران بازدید کننده

3 پاسخ

سلام
چطور میتونم کاربرانی که وارد سایت می شن رو بفهمم از کدوم کشور هستن
ip کاربر رو ثبت میکنم چطور میشه فهمید؟

ثبت پرسش جدید

پاسخ‌ها

3
علی بیات
علی بیات
@ali.bayat

تخصص: توسعه دهنده ارشد وب

حسین حصاری
حسین حصاری
@hoseinhesari.ir

@ali.bayat
به نظرتون استفاده از پکیج بهتره یا این روش

https://stackoverflow.com/questions/12553160/getting-visitors-country-from-their-ip

این روش اسم کشور هارو مخفف میگه باید براش چیزی بنویسی
این پکیج هم اسم کشور هارو مخفف میگه؟

شاید پاسخ شما همین‌جا باشد

علی بیات
علی بیات
@ali.bayat

تخصص: توسعه دهنده ارشد وب

@hoseinhesari.ir

پکیجی که اشاره کردم٬ اسم مخفف کشورها + امکانات بیشتری رو در اختیار شما میذاره.

$ipLocation->getStatusCode(); // returns status code of request (e.g. 200)
$ipLocation->getStatusMessage(); // returns any status message to go with code
$ipLocation->getIpAddress(); // the geolocation IP requested
$ipLocation->getCountryCode(); // country code of the IP e.g. GB
$ipLocation->getCountryName(); // country name of the IP e.g. United Kingdom
$ipLocation->getRegionName(); // region name of the IP e.g. England
$ipLocation->getCityName(); // city name of the IP e.g. London
$ipLocation->getZipCode(); // postcode of the IP e.g. SE01 1AA
$ipLocation->getPostCode(); // postcode of the IP e.g. SE01 1AA
$ipLocation->getLatitude(); // latitude of the IP e.g. 53.4030
$ipLocation->getLongitude(); // longitude of the IP e.g. -1.201
$ipLocation->getTimeZone(); // timezone of the IP e.g.
$ipLocation->getAddressString(); // gets the city, region and country as a string
$ipLocation->toArray(); // returns object as an array
$ipLocation->toJson(); // returns object as a json object

برای ارسال پاسخ لازم است وارد شده یا ثبت‌نام کنید

ورود یا ثبت‌نام