简体   繁体   English

通过Flash获取我的位置

[英]Get my Location with Flash

is it possible to show my Town (find by IP) / Town of my Provider in Flash File? 是否可以在Flash File中显示我的城镇(由IP查找)/我的提供商的城镇?

Maybe there are some libs for this. 也许有一些库。

Thx 谢谢

Maybe it would be better to use server side language to take the IP and location and pass that to the Flash application. 也许最好使用服务器端语言来获取IP和位置并将其传递给Flash应用程序。 eg PHP, ASP 例如PHP,ASP

Also you can have a look at that: http://ipinfodb.com/flash_ip_info.php 您也可以看一下: http : //ipinfodb.com/flash_ip_info.php

Check out the ActionScript 3.0 IPinfodb API here: 在此处查看ActionScript 3.0 IPinfodb API:

http://creative-geeks.com/blog/2009/06/09/ipinfodb-actionscript-30-api/ http://creative-geeks.com/blog/2009/06/09/ipinfodb-actionscript-30-api/

If you are going to get the IP location with PHP you can check this tutorial: http://creative-geeks.com/blog/2012/05/06/getting-ip-information-with-php-and-curl/ 如果要使用PHP获取IP位置,则可以查看本教程: http : //creative-geeks.com/blog/2012/05/06/getting-ip-information-with-php-and-curl/

You can then pass the IP location data to the SWF file. 然后,您可以将IP位置数据传递到SWF文件。 That's how usually hook it up, because then I'm not limited to ActionScript and enables me to use the same function for other non ActionScript projects. 那就是通常的连接方式,因为那时我不仅限于ActionScript,还可以将相同的功能用于其他非ActionScript项目。 This method also increases code centralization. 此方法还提高了代码集中度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM