M
M
maza2k22018-03-29 10:03:27
JavaScript
maza2k2, 2018-03-29 10:03:27

How to implement an API request for a range of ip addresses?

Greetings.
There are a couple of hundred and many cameras that can be configured using the API.
I want to make an HTML page with javascript where you can specify the ip range.
A field where you can specify the request itself.
And a send button.
Request example:
http:///cgi-bin/devVideoInput.cgi?action=autoFocus Where
do I start?
Or maybe somewhere there is an example to blind in the image and likeness.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Talyan, 2018-03-29
@flapflapjack

<iframe src="" id=ifr></iframe>

//подключаем сперва jQuery откуда-нибудь, например с гугла, потом:

var max_ip=254;

for(var i=1;i<=max_ip;i++)
{
var query='http://78.36.96.'+i+/cgi-bin/devVideoInput.cgi?action=autoFocus;
setTimeout(function () {
     $('#ifr').attr('src', query);
}, 10);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question