Right now I'm logged in this way.
And if I make a request for a list of videos, there are 3 authorizations:
The documentation says that I should send the correct header and encrypt it via base64, but I never understood what exactly I should do. Has anyone been able to figure out how to properly authorize on camera?
PHP:
function reqCam($url, $code = false) {
$ch = curl_init($url);
curl_setopt_array($ch, [CURLOPT_USERPWD => "admin:password", CURLOPT_CONNECTTIMEOUT => 15, CURLOPT_RETURNTRANSFER => 1, CURLOPT_HTTPAUTH=>CURLAUTH_ANY]);
$res = curl_exec($ch);
if ($code) return curl_getinfo($ch, CURLINFO_HTTP_CODE);
return $res;
}
And if I make a request for a list of videos, there are 3 authorizations:
- /cgi-bin/mediaFileFind.cgi?action=factory.create
- /cgi-bin/mediaFileFind.cgi?action=findFile&object={$id[1]}&condition.Channel=1&condition.StartTime=$start&condition.EndTime=$end&condition.Types[0]=dav
- /cgi-bin/mediaFileFind.cgi?action=findNextFile&object={$id[1]}&count=100
The documentation says that I should send the correct header and encrypt it via base64, but I never understood what exactly I should do. Has anyone been able to figure out how to properly authorize on camera?