i try now for hours to resolve following problem. I own a Wansview IP Camera and get access via Browser with success. http://my:password@ip:8080 works very well with browser. Now i've tried this via file_get_contents and curl with user agent settings and get every time 401 authentication error:
<?php
ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3');
$result = file_get_contens('http://my:password@ip:8080/snap.cgi');
var_dump($result);
?>
Tried via curl http auth and get same error... What i belive is, that the cam have a browser detection and block bad access.
Anyone get access to the Picture via CGI at Wansview?
Edit: It's totally simple. I read out header from Cam response. Auth will be digest. I use curl with auth digest and get the picture of cam.