This is the code im using:
$fp = fsockopen ("192.168.1.1", 80, $errno, $errstr, 30);
$pass = base64_encode("derek:password");
fputs($fp, "GET /Status.htm HTTP/1.1\r\nAuthorization: Basic $admin\r\n");
while (!feof($fp)) {
echo fgets ($fp,128);
}
fclose ($fp);
This is what returns:
HTTP/1.1 401 Authorization Required
WWW-Authenticate: Basic realm="Linksys BEFSR41/BEFSR11/BEFSRU31"
Server: Linksys BEFSR41/BEFSR11/BEFSRU31 ver1.36
Content-type: image/gif
Expires: Thu, 13 Dec 1969 10:29:00 GMT
Pragma: no-cache
Content-length: 339