You are viewing our Forum Archives. To view or take place in current topics click here.
Need help with JS / scanning an ip
Posted:

Need help with JS / scanning an ipPosted:

Furdew
  • Christmas!
Status: Offline
Joined: Jul 03, 201113Year Member
Posts: 978
Reputation Power: 38
Status: Offline
Joined: Jul 03, 201113Year Member
Posts: 978
Reputation Power: 38
Ok so say i wanted to scan multiple ip's at once.

3 to be exact, and i have them labeled as "var sub = ip shit here]

How do i make it so i can scan all 3 at once?

My friend helped me with this, but i still dont understand.

var load = ["sub","sub2","sub3"];
for(var n in load){
$.get(load[n]);
}
#2. Posted:
ObscureCoder
  • Resident Elite
Status: Offline
Joined: Jun 29, 201311Year Member
Posts: 211
Reputation Power: 13
Status: Offline
Joined: Jun 29, 201311Year Member
Posts: 211
Reputation Power: 13
Furdew wrote Ok so say i wanted to scan multiple ip's at once.

3 to be exact, and i have them labeled as "var sub = ip shit here]

How do i make it so i can scan all 3 at once?

My friend helped me with this, but i still dont understand.

var load = ["sub","sub2","sub3"];
for(var n in load){
$.get(load[n]);
}


That code is simply using a foreach loop where in each iteration, n is the index of the ip address in the load array. It will then use jQuery to send a GET (hence $.get("url/ip/whatever")) request.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.