Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67497

Getting IP to fill in Form through smartip.io

$
0
0

I am having some trouble getting IP information to fill a hidden Form field.

So far I used a free service ipinfo.io but because I am getting way too many responses per day, this free website is not going to be enough. Therefore I will have to buy a better service.

This is the code i used till today:

<script type="text/javascript">

$.get("https://ipinfo.io", function (response) {
    $("#IPnaslov").html("IP: " + response.ip);
    $("#address").html("Location: " + response.city + ", " + response.region);
    $("#details").html(JSON.stringify(response, null, 4));
    $("#city").html(response.city);
    document.getElementById('ip').value = response.ip;
}, "jsonp");
</script>

<form>
<input name="IPnaslov" type="hidden" id='ip'type="hidden">
  <br><button type="submit" class="btn btn-outline-danger" name="submitted" value="true">Submit</button>
</form>

There ar emany IP service on the market and i can't figure out which one to use. I tried https://smartip.io/ because it has a free registration for up to 125000 requests.

Is there a way I can use their service similar to the way I used ipinfo.io?

Thank you again for the help in advance.


Viewing all articles
Browse latest Browse all 67497

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>