Alibabacloud.com offers a wide variety of articles about how to get someones address from ip, easily find your how to get someones address from ip information here online.
Using the interface program of QQ
202.105.128.73, Shenzhen, Guangdong province
Shenzhen city, Guangdong province
Now let's take a look at a Google API to get User IP address details.
The API provides a total of 6 interfaces, Geoip_country_code () {Country Code},geoip_country_ name () {Country name},geoip_c
/* code from Stackoverflow:http://stackoverflow.com/questions/212528/linux-c-get-the-ip-address-of-local-computer */# Include C language by enumerating network cards, API interface can view man 7 netdevice--get interface IP address
Use jquery to get the API interface and then return to the array.
code is as follows
copy code
$ (function ( { $ ("#btnGetIP"). Click (function () { var jqxhr = $.getjson ("http://jsonip.appspot.com?callback=?", function (data) { alert (DATA.IP); }) . Error (function () {alert ("error");}) }); });
Another way to use Ajax
The code is as follows
Copy Code
/* Access to
1 Get IPV4 Addresspublicstringgetlocalipaddress () { Stringaddress= "0";try{ Enumeration 2 Get IPV6 address publicstringgetlocalipaddress () { Stringaddress= "0";try{ EnumerationThis article is from the "Jackyanngo" blog, make sure to keep this source http://jackyanngo.blog.51cto.com/5263823/1614611[Android] Get
WebService client access, the server gets the client IP address.ImportJavax.xml.ws.WebServiceContext;ImportJavax.xml.ws.handler.MessageContext;ImportOrg.apache.cxf.jaxws.context.WebServiceContextImpl;Importjavax.servlet.http.HttpServletRequest;Importorg.apache.cxf.transport.http.AbstractHTTPDestination; PublicString getipaddress () {Webservicecontext context=NewWebservicecontextimpl (); Messagecontext CTX=Context.getmessagecontext (); HttpServletReque
The code that gets the native IP address under Linux, the return value is the Internet standard dot-format string.#defineEth_name "Eth0"//get the native IP addressChar*getlocaladdress () {intsock; structsockaddr_in sin; structIfreq IFR; Sock= Socket (Af_inet, SOCK_DGRAM,0); if(Sock = =-1) {perror ("Socket"); returnNULL
Get IP Address
The Java code is as follows:
Import java.net.Inet4Address;
Import java.net.InetAddress;
Import Java.net.NetworkInterface;
Import java.net.SocketException;
Import java.net.UnknownHostException;
Import java.util.Enumeration;
public class Testgetip {public static void main (string[] args) {Testgetip testgetip = new Testgetip ();
Te
This example describes how Python uses Django to get a user's IP address. Share to everyone for your reference. Specific as follows:
Function implementation:
def get_client_ip (Request): try: real_ip = Request. meta[' http_x_forwarded_for ' REGIP = Real_ip.split (",") [0]except: try: REGIP = Request. meta[' REMOTE_ADDR ' except: REGIP = "" Return REG
/freedesktop/networkmanager/ ACTIVECONNECTION/4: (+) Method "Get" with signature "ss" on Interface "org.freedesktop.DBus.Properties" doesn ' t existStatus: UnknownError: Activation connection failed.[Email protected] ~]#Workaround: Open Edit in VMware-- Virtual network editor -vmnet automatic settings after information - remove Virtualbox host-only Ethernet Adapter Pre-check OK to save and then landed Redhat # ifup Eth0To restart the network card :[E
Note:
1. JDK version. Therefore, the absolute path is used when Java is executed.
2. Introduction of classpath: in Windows
C: \ java1.5 \ bin> JAVA-classpath Lib \ log4j-1.2.9.jar;. JP. yicha. CPM. util. accesslogutil this is OK, and in Linux this is always an error
Load Java programming language agent, see java. Lang. InstrumentBash:. JP. yicha. CPM. util. Test: Command not found
Cause of error: Change the classpath to colon
/Usr/Java/jrockit-jdk1.5.0_12/bin/Java-classpath lib/log4j-1.2.9
How to modify the IP address method (this article refers to the method of modifying the IP address, only for LAN IP (static IP), dynamic IP is DHCP automatically allocated, can not be c
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.