Пробую сделать авторизацию таким вот образом:
<?php
$username = "guest";
$password = "";
$hostname = "192.166.103.19";
$fp = fsockopen($hostname, 81, $errno, $errstr, 30);
if (!$fp) echo "$errstr ($errno)<br />\n";
else
{
$data = "subaction=dologin&username=$username&password=$password&";
$headers = "POST HTTP/1.1\r\n";
$headers .= "Host: $hostname\r\n";
$headers .= "Content-type: application/x-www-form-urlencoded\r\n";
$headers .= "Content-Length: ".strlen($data)."\r\n";
fwrite($fp, $headers.$data);
}
?>
$username = "guest";
$password = "";
$hostname = "192.166.103.19";
$fp = fsockopen($hostname, 81, $errno, $errstr, 30);
if (!$fp) echo "$errstr ($errno)<br />\n";
else
{
$data = "subaction=dologin&username=$username&password=$password&";
$headers = "POST HTTP/1.1\r\n";
$headers .= "Host: $hostname\r\n";
$headers .= "Content-type: application/x-www-form-urlencoded\r\n";
$headers .= "Content-Length: ".strlen($data)."\r\n";
fwrite($fp, $headers.$data);
}
?>
<div align="center">
<applet code="com.charliemouse.cambozola.Viewer" archive="/cambozola.jar" width="640" height="480">
<param name="url" value="http://192.166.103.19:81/video/mjpg.cgi">
</applet>
</div>
Ошибок не выдает, но окно авторизации Явы все равно выскакивает
Что не так ?