To get a snapshot you have to do a POST or a GET command to the device. like so
http://[:port]/GetSnapshot{/channelid]
I have done a stike to remove the link feature on browsers. Breaking this down is the ip of the device,port is the http port and [/channelid] is the channel number. So if you want a snapshot from a recorder channel 3 then input the numerical 3. For a camera snapshot default to 1.
Doing a POST request.
HTTP Code
Host: 192.168.1.201
Authorization: Basic YWRtaW46MTIzNDU2
Cache-Control: no-cache
Postman-Token: a5cb034f-5135-b757-6236-6adf083b2171
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
PHP Code
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'postman-token' => '8bce154d-59b3-51b1-1663-8bc46a0c28af',
'cache-control' => 'no-cache',
'authorization' => 'Basic YWRtaW46MTIzNDU2'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Curl code
For a GET Request do
HTTP Code
Host: 192.168.1.201
Authorization: Basic YWRtaW46MTIzNDU2
Cache-Control: no-cache
Postman-Token: 5f78cb4b-1618-1432-412b-41f28be49ffd
PHP Code
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'postman-token' => 'ddce98d0-6915-9e11-fbf4-f093215e4cc3',
'cache-control' => 'no-cache',
'authorization' => 'Basic YWRtaW46MTIzNDU2'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Curl Code
For these, there is an auth which is basic. You can use a basic generator to add the proper string. Here we are using the default admin/123456 to authenticate ourselves when requesting for the snapshot.
Jose Malave - IT Director| Toll Free: 866-573-8878 | E-mail: support@securitycameraking.com
1 Guest(s)