问题描述
我已经开发了WAP应用程序,并且希望获得访问我的网站的用户的MSISDN.
I have developed a WAP application and I would like to get the MSISDN of the users that visit my site.
我的接线员已将我的WAP应用程序列入白名单.
My operator has white listed my WAP application.
我在几个三星手机上成功获得了MSISDN,但是在诺基亚,黑莓& amp;上却没有得到相同的结果. iPhone设备.
I am getting MSISDN successfully on couple of Samsung Mobiles, but not getting same result on Nokia, BlackBerry & iPhone deviceas.
请向我建议获取所有设备的MSISDN号码的最佳方法.
Please suggest me best way to get MSISDN number for all devices.
推荐答案
获得访问WAP网站的用户的MSISDN的能力取决于许多因素.
The ability to get the MSISDN of the user visiting the WAP site depends on a number of things.
首先,用户必须使用移动数据.如果用户使用WiFi,则您将不会收到此信息.
Firstly, the user has to be on Mobile Data. If the user is on WiFi then you will not receive this information.
第二,用户移动网络必须支持在HTTP标头中传递MSISDN.
Secondly, the users mobile network has to support the passing of the MSISDN in the HTTP headers.
某些移动网络会在所有请求上发送标头.其他人仅在经过特定的APN时发送.有些仅将此标头发送到特定的IP地址/块.我什至遇到过以$ _GET变量发送MSISDN的网络.您将需要与打算支持的每个网络进行核对.
Some mobile networks send headers on all requests. Others only send if going through a specific APN. Some only send this header to specific IP addresses/blocks. I have even come across networks that send the MSISDN as a $_GET variable. You will need to check with each network that you intend to support.
例如,南非的一个特定网络在大约6个月前以前一直在标头中发送MSISDN,并且为了现在在标头中接收MSISDN,您的服务器地址需要与它们一起列入白名单.
For example, a particular network in South Africa used to send MSISDNs in headers until around 6 months ago, and in order to receive the MSISDN in the headers now your server address needs to be whitelisted with them.
还请记住,标头很容易被欺骗,除非确保您是HTTP请求的发起者(例如在Android应用程序内部使用Web视图的情况下),否则不应依赖标头需要自己采取足够的措施.
Also remember that headers are very easy to spoof, and shouldn't be relied on unless you are guaranteed that you are the originator of the HTTP request, such as in instances where you are using Web Views inside of Android Applications - you would need to put sufficient measures in place yourself.
牢记所有这些,这是您应该寻找的:
With all of that in mind, here is what you should be looking for:
在标题中查找以下任何内容.这根本不是一个全面的MSISDN标头列表,它们只是我在移动开发中遇到的那些标头.
Look through your headers for any of the following. This is not a comprehensive list of MSISDN headers at all, they are only the ones I have come across in my adventures in mobile development.
- X-MSISDN
- X_MSISDN
- HTTP_X_MSISDN
- X-UP-CALLING-LINE-ID
- X_UP_CALLING_LINE_ID
- HTTP_X_UP_CALLING_LINE_ID
- X_WAP_NETWORK_CLIENT_MSISDN
我所做的是通过标题查找所有匹配项.如果找不到任何匹配项,我将使用针对特定国家/地区的MSISDN正则表达式再次对这些标题进行遍历,以查看我不知道的键的标题中是否存在任何潜在的MSISDN.如果找到潜在的匹配项,则将密钥和数据添加到稍后可以通过的列表中,以便添加到已知的MSISDN标头列表中.
What I do is run through the headers looking for any matches. If I don't find any matches I run through the headers again using a country-specific MSISDN regex against the values to see if there are any potential MSISDNs in the headers on keys that I do not know about. If I find a potential match I add the key and data to a list that I can go through later in order to add to my list of known MSISDN headers.
我希望这可以使您有所了解.要记住的最重要一点是,这不是获取MSISDN的可靠方法.
I hope this has bought some clarity. What is most important to remember is that this is not a reliable method for getting an MSISDN.
这篇关于如何使用PHP在WAP中获取MSISDN号码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!