php ip位置 [英] php ip location

查看:130
本文介绍了php ip位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的问题。
是否可以通过IP位置重定向我网站中的人员?

I have a simple question. Is it possible to redirect people in my website by the IP location?

示例:
一个人在网站上导航以及何时付费,如果ip位置来自葡萄牙通过银行转账付款,如果不是通过paypal支付?

Example: one person navigates on the site and when go to pay, if the ip location is from Portugal pay by bank transfer, if not pay by paypal?

抱歉我的英文。
谢谢,
Pedro Lopes

sorry my english. thanks, Pedro Lopes

推荐答案

最后,听起来你只关心哪个计费平台发送给他们。允许您的用户从您支持的国家/地区列表中选择他们的国家/地区要容易得多,也更可靠。这比基于IP的解决方案更准确,它可以解决可能不在家用计算机上的旅行者。 链接 @中基于IP的位置存在更多潜在问题Piskvor在上面的评论中提供。

In the end, it sounds like you only really care about which billing platform to send them to. It is far easier and more reliable to allow your users to select their country from a list of countries you support. This is both more accurate than the IP-based solution and it solves for travelers who may not be at their home computer. There are more potential issues with IP-based location in the link @Piskvor provided in the comments above.

对于您提供的示例,您可以提供标准的帐单地址表单。如果用户选择葡萄牙以外的国家/地区,则银行转帐投标类型将被禁用,并选择PayPal。

For the example you gave, you could offer your standard billing address form. If the user selects a country other than Portugal, the bank transfer tender type gets disabled, and PayPal is selected.

这篇关于php ip位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆