I have two IP Camera from DLINK DCS 2121 and I want to see both both on one web page.
The camera requires http authentication. I was trying to authenticate using the attached code , but it won't work.
The reposnse is code 500 internal server error .
Any help would be highly appreciate it.
// create cURL resource
$ch = curl_init();
// set options
curl_setopt($ch, CURLOPT_URL, "http://mydomain.com.org");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, base64_encode('admin:pw001');
// grab URL and pass it to the browser
// close cURL resource, and free up system resources