ip-address

Checking if string is web address or ip on android

北战南征 提交于 2019-12-24 05:31:25
问题 I need to validate if string entered in TextEdit is a web address eg. "www.stackoverflow.com" or an ip address eg. "64.34.119.12". I have tried this two methods without success. I have private class variable named ip. Method 1: public boolean isAdress(){ boolean isaddr = true; try { ip = new NetTask().execute(""+textEdit1.getText()).get(); } catch (Exception ex) { isaddr = false; } return isaddr; } Method 2 is the one were I check string before sending it to NetTask. public boolean isAdress()

Get user ip with jquery

馋奶兔 提交于 2019-12-24 03:34:18
问题 I want to get the user's IP address with jQuery or JavaScript, it doesn't really matter but I prefer jQuery. I've seen some answers here but they didn't work for me. 回答1: This has been taken from How to get client IP address using jQuery $.getJSON("http://jsonip.appspot.com?callback=?", function(data){ alert( "Your ip: " + data.ip); }); 回答2: That isn't exposed to javascript, but if you really need it you could spit it out in your markup (assuming php): <head> <meta name="ip" content="<?php

How To Capture ISP Name?

独自空忆成欢 提交于 2019-12-24 03:27:07
问题 How do I capture the user's ISP name in Salesforce.com? The solution can be in JavaScript of in Salesforce.com such as Apex/VisualForce Pages. Example of a website which captures the user's ISP name is: http://whatismyipaddress.com/ Thanks! 回答1: You'll need to query a GeoLocation provider database that has the ISP provider information. Here is a list of providers listed on the page you've linked in your question: http://whatismyipaddress.com/geolocation-providers They usually require you to

What is a “Live IP Address”?

感情迁移 提交于 2019-12-24 01:54:21
问题 What is a "Live IP Address"? For example, what does it mean when someone says "I transferred my project from place A to B through a Live IP"? 回答1: Development, especially of web-sites, frequently takes place on a test-machine or a test-network. This will be on an internal subnet, sometimes with databases, resources, scalability and failover not available, faked, or stubbed out. When the system is ready for deployment, it is transferred to a Live IP Address, meaning it is visible to the world,

Access SSH client IP address, within a screen session

拟墨画扇 提交于 2019-12-23 20:34:20
问题 Accessing the IP address of a connecting SSH client is possible via environment variables (such as SSH_CONNECTION), as described in Find the IP address of the client in an SSH session In a GNU screen session though, those environment variables are defined by whoever started the screen to begin with. Is there any way to also get hold of the SSH connection information, for someone who enters an already-existing screen session later, like from another host? I can't think of a way to determine

ipv4 and ipv6 from any valid address

点点圈 提交于 2019-12-23 20:00:41
问题 I'm trying to get both the ipv4 and ipv6 address from any string address, be it by ipv4, ipv6, or DNS address. I can create my own function to do so, but I'm trying to take expert advice and utilize built-in capabilities. Is there a way to input an address string of any format, and have both ipv4 and ipv6 boost addresses returned? 回答1: Getting an address from the DNS name involves... querying a naming server (DNS!). If you want to enumerate the results, use a resolver in asio: http://www

Find time zone from IP address

风格不统一 提交于 2019-12-23 19:54:54
问题 Is there a way to find the time zone a user is in when all I have is their IP address? I'm looking for the time offset I need to apply to the server time in order to find the time for the user's location. 回答1: You'll need to attempt to determine the location (which is far from 100% accurate). See this question about doing just that. See this question about translating a zip code into time zone (though that, again, is not 100% fool proof). The short version is: it's complicated. You'll have to

What is the easiest way using common linux tools to check if a bunch of ip addresses belongs to given network?

断了今生、忘了曾经 提交于 2019-12-23 18:19:43
问题 What is the easiest way using common linux tools to check if a bunch of ip addresses belongs to given network? I just need a number of how many of given addresses belongs to given subnet. Lets say network is 192.16.55.40/27 and addresses is 192.16.55.45, 192.16.55.115, 88.87.45.8, 192.16.55.37, 192.16.55.60 and 192.16.55.210.. 回答1: I'm not sure whether you consider Ruby as a "common linux tool" but it has a nice module called IPAddr that has a method called include? for that. require 'ipaddr'

does Mobile phones have IP address

时光怂恿深爱的人放手 提交于 2019-12-23 18:03:12
问题 Hi All Can you tell me if the mobile phones have IP address.. (I know we have it if we connect our phones to Wi-Fi)..but if we connect via GPRS.. if the answer is yes..how can I find it..I am doing the coding in J2ME and LUWIT... 回答1: If you connect through GPRS then no your mobile does not have an unique IP address. 来源: https://stackoverflow.com/questions/4623163/does-mobile-phones-have-ip-address

improving query times a sql ip lookup database

霸气de小男生 提交于 2019-12-23 17:17:26
问题 I have a table in sql server 2005 which holds an ip range and the corresponding info (country / city / etc). There are approximately 3 million rows and it currently takes just over half a second to return a record based on the query below. DECLARE @ip BIGINT SELECT @ip=3561360969 SELECT TOP 1 id, ipfrom, ipto, countrycode, countryname,region,city FROM tbl_ip WHERE ipfrom <= @ip and @ip <= ipto Can anyone offer any suggestions to improve the query time as the system I'm building needs to