De onde estão vindo os visitantes de seu site?
Com a ferramentas grátis de geolocalização por endereço IP do site ipinfodb.com você pode detectar onde seus visitantes estão vindo.
Vá em http://ipinfodb.com/register.php e registre-se para receber uma chave para poder utilizar a API gratuitamente.
Default.aspx
<table>
<tr>
<td>
<strong>statusCode</strong>
</td>
<td>
<asp:Literal ID="litStatusCode" runat="server" />
</td>
</tr>
<tr>
<td>
<strong>statusMessage</strong>
</td>
<td>
<asp:Literal ID="litStatusMessage" runat="server" />
</td>
</tr>
<tr>
<td>
<strong>ipAddress</strong>
</td>
<td>
<asp:Literal ID="litIpAddress" runat="server" />
</td>
</tr>
<tr>
<td>
<strong>countryCode</strong>
</td>
<td>
<asp:Literal ID="litCountryCode" runat="server" />
</td>
</tr>
<tr>
<td>
<strong>countryName</strong>
</td>
<td>
<asp:Literal ID="litCountryName" runat="server" />
</td>
</tr>
<tr>
<td>
<strong>regionName</strong>
</td>
<td>
<asp:Literal ID="litRegionName" runat="server" />
</td>
</tr>
<tr>
<td>
<strong>cityName</strong>
</td>
<td>
<asp:Literal ID="litCityName" runat="server" />
</td>
</tr>
<tr>
<td>
<strong>zipCode</strong>
</td>
<td>
<asp:Literal ID="litZipCode" runat="server" />
</td>
</tr>
<tr>
<td>
<strong>latitude</strong>
</td>
<td>
<asp:Literal ID="litLatitude" runat="server" />
</td>
</tr>
<tr>
<td>
<strong>longitude</strong>
</td>
<td>
<asp:Literal ID="litLongitude" runat="server" />
</td>
</tr>
<tr>
<td>
<strong>timeZone</strong>
</td>
<td>
<asp:Literal ID="litTimeZone" runat="server" />
</td>
</tr>
</table>
Default.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
//va em http://ipinfodb.com/register.php e registre-se para usar a API gratuitamente
//após o cadastro vecê receberá uma chave, que deve ser inserida na URL da pesquisa
const string KEY = "SUACHAVE";
string sIP = "74.125.229.80"; //Endereço IP
string sFormat = "xml"; //Formato de retorno pode ser: raw, xml, json
//URL + CHAVE + IP + FORMATO
string sUrl = "http://api.ipinfodb.com/v3/ip-city/?key=" + KEY + "&ip=" + sIP + "&format=" + sFormat;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sUrl);
//request.Proxy = GlobalProxySelection.GetEmptyWebProxy();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream stream = response.GetResponseStream();
XmlDocument xml = new XmlDocument();
xml.Load(stream); //Carregando o arquivo
XmlNode nodeRoot = xml.DocumentElement;
foreach (XmlNode xn in nodeRoot)
{
litStatusCode.Text = xn.ParentNode["statusCode"].InnerText;
litStatusMessage.Text = xn.ParentNode["statusMessage"].InnerText;
litIpAddress.Text = xn.ParentNode["ipAddress"].InnerText;
litCountryCode.Text = xn.ParentNode["countryCode"].InnerText;
litCountryName.Text = xn.ParentNode["countryName"].InnerText;
litRegionName.Text = xn.ParentNode["regionName"].InnerText;
litCityName.Text = xn.ParentNode["cityName"].InnerText;
litZipCode.Text = xn.ParentNode["zipCode"].InnerText;
litLatitude.Text = xn.ParentNode["latitude"].InnerText;
litLongitude.Text = xn.ParentNode["longitude"].InnerText;
litTimeZone.Text = xn.ParentNode["timeZone"].InnerText;
}
}
Mais detalhes da API
http://ipinfodb.com/ip_location_api.php