开发者

Finding the IP address in Adobe AIR

开发者 https://www.devze.com 2022-12-11 02:28 出处:网络
How to know the IP address of the system in which the AIR application 开发者_运维知识库is currently running, Or

How to know the IP address of the system in which the AIR application 开发者_运维知识库is currently running, Or how to restrict the usage of AIR application for a particular country?


Please try the following code, it works for me.

import flash.net.InterfaceAddress;
import flash.net.NetworkInterface;

var netInterfaces:Vector.<NetworkInterface> = NetworkInfo.networkInfo.findInterfaces();
var addresses:Vector.<InterfaceAddress> = netInterfaces[0].addresses;
ipAddress = addresses[0].address;
0

精彩评论

暂无评论...
验证码 换一张
取 消