Get the location of iP and network operator
Applications used:7
Product services support payments in USD, HKD, and USDT
HTTP protocol:
http://api.youripapi.com/ipdata/
HTTPS protocol:
https://api.youripapi.com/ipdata/
* The API interface may be blocked due to various network reasons and attacks. Please make redundancy and exception handling during development
*If the status code returned by the HTTP request is not 200, perform an exception. For example, the status code 202 May be caused by invalid Token, insufficient balance, or incorrect format
P query interface example for C#(.net):
using System;
using System.Collections.Generic;
using System.Web;
using System.Net;
using System.Text;
public class youripapi
{
public static string GetIPData(string token, string ip = null, string datatype = "txt")
{
if (string.IsNullOrEmpty(ip))
{
ip = HttpContext.Current.Request.UserHostAddress;
}
string url = string.Format("https://api.youripapi.com/ip/?ip={0}&datatype={1}&token={2}", ip, datatype, token);
using (WebClient client = new WebClient())
{
client.Encoding = Encoding.UTF8;
return client.DownloadString(url);
}
}
}
string data = youripapi.GetIPData("00d5cb1fac5dc5cbfe2ff218222a2dfd33", Request.UserHostAddress);
Console.WriteLine(data);
Response.Write(data);
<%
string ip = Request.UserHostAddress;
string strMid = "777"; // User Center View your mid
string oid = "777"; // User Center View your oid
string token = "00d5cb1fac5dc5cbfe2ff218222a2dfd33"; // User Center View your token
string url = "https://api.youripapi.com/ip/?";
string str = "ip=" + ip + "&token=" + token;
string sign = FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower();
%>
<script type="text/javascript">
function find(str){alert(str.data);}
</script>
<script type="text/javascript" src="<%= url+"ip="+ip+"&callback=find&mid="+strMid+"&oid="+oid+"&sign="+sign %>"></script>