I managed to automatically write the IP, time, and email information of the visitors to my page into the log, but I want to implement your find visitors geo project with asp.net without JavaScript.
Country_Code
Country_Name
Region_Code Region_Name
City Time_Zone
Latitude
longitude
best regards
My code is like this and it works 100%.
protected void Page_Load(object sender, EventArgs e)
{
string yipAddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (string.IsNullOrEmpty(yipAddress))
{
yipAddress = Request.ServerVariables["REMOTE_ADDR"];
string time =DateTime.Now.ToString();
string date = DateTime.Now.ToString();
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());
con.Open();
string query = "insert into ipb(ipno,date,time) values('" + yipAddress + "','" + date+ "','" + time+ "')";
// Response.Write(query);
SqlCommand cmd = new SqlCommand(query, con);
cmd.ExecuteNonQuery();
con.Close();
How can I adapt this to my table for asp.net without JavaScript?