...Si, ya se que Php se ejecuta en el servidor y Javascript en el cliente....
El problema que se me plantea es el siguiente: Me pasan los parámetros para conectarme a una camara ip en un html de ejemplo que utiliza javascript. Funciona perfectamente, pero al editar el cógigo html se pueden leer todos los datos (usuario, contraseña, ip, puerto, etc, etc).
Alternativas de encriptación a parte, me gustaria saber si puedo pasar todos estos parámetros por php, para que no se presenten en el código del navegador del usuario.
Os adjunto el ejemplo html que me suministra el fabricante...
Gracias por vuestra atencion.
Pd.- Disculpad de antemano mi ignorancia, pero no soy programador
Código Ejemplo .html:
Ver original
<HTML> <!--HEADER BEGINS:Insert your own title below and adjust your own styles as necessary------------------> <HEAD> <TITLE>DEMO PAGE</TITLE> <META http-equiv=content-type content="text/html; charset=utf-8"> <STYLE> TD { FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #ffffff; FONT-FAMILY: Arial,Helvetica,Sans-Serif } INPUT { FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #ffffff; FONT-FAMILY: Arial,Helvetica,Sans-Serif } SELECT { FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #ffffff; FONT-FAMILY: Arial,Helvetica,Sans-Serif } TEXTAREA { FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #ffffff; FONT-FAMILY: Arial,Helvetica,Sans-Serif } .clsTimer { BACKGROUND-COLOR: #004e98 } .clsLiving { COLOR: #ffff00; TEXT-ALIGN: right } .txtLabel { FONT-SIZE: 16pt; COLOR: #004e98; TEXT-ALIGN: right } .DemoTitle { FONT-SIZE: 13pt; COLOR: #004e98 } .clsBkclr { BACKGROUND-COLOR: #7f9db9 } </STYLE> </HEAD> <!--HEADER ENDS---------------------------------------------------------------------------------------> <!--SCRIPT BEGINS-----------------------------------------------------------------------------------------> <SCRIPT language=javascript> var nTimer ; function Play() { window.clearInterval(nTimer); NV1.MediaType = 4 ; NV1.ID = 1 ; NV1.SetActive(1); NV1.DisplayTitleBar(0); //<!--LOGIN RELATED CHANGES BEGIN------------------------------------------------------------------------------> NV1.MediaSource = "IP_PUBLICA_AQUI"; //NOTE=> Input your Video Server IP NV1.MediaUserName = "USUARIO"; //NOTE=> Input your Video Server User Name NV1.MediaPassword = "PASSWORD"; //NOTE=> Input your Video Server Password NV1.Httpport = 80; //NOTE=> Input your Video Server Http Port NV1.RegisterPort = 6000; //NOTE=> Input your Video Server Register Port NV1.ControlPort = 6001; //NOTE=> Input your Video Server Control Port NV1.StreamingPort = 6002; //NOTE=> Input your Video Server Streaming Port NV1.MulticastPort = 5000; //NOTE=> Input your Video Server Multicast Port NV1.Vendor="PELCO"; //NOTE=> Input your PTZ Vendor, IN CAPTICALS NV1.Protocol="PELCO-P"; //NOTE=> Input your PTZ Protocol, IN CAPTICALS NV1.AddressID="1"; //NOTE=> Input your PTZ Address ID NV1.PTZPostMode="1"; NV1.Parity="N81"; //NOTE=> Input your PTZ Parity NV1.BaudRate="9600"; //NOTE=> Input your PTZ Baudrate NV1.Connect() ; NV1.Play() ; if (NV1.ContentStatus>=2) { NV1.EnablePTZ(); //NOTE=> Enable/Disable PTZ NV1.DisableMousePTZ(); //NOTE=> Enable/Disable Mouse PTZ setInterval("chgTimer()", 1000);//Start the Count dowm } } var bfrEnd = 720 ; var nLivingTime = 60; //NOTE=> Select the time of this demo display var nStep = parseInt(bfrEnd/nLivingTime) //<!--LOGIN RELATED CHANGES END------------------------------------------------------------------------------> function chgTimer() { bfrEnd -= nStep ; nLivingTime-- ; tmTimer.style.width = bfrEnd ; tmTimer.style.pixelLeft += nStep txtLiving.innerText = 'Demo ends after ' + nLivingTime + ' sec' ; if (nLivingTime == 0 ) winClose() ; //NOTE==> Enable/Disable close the live demo window } function winClose() { NV1.Disconnect() ; window.opener=null ; window.close() ; } nTimer=setInterval("window.Play()",100); function chkMouse() { if ( event.button == 2 ) { alert('The right mouse button was locked'); //NOTE ==> Disable right mouse button return false ; //NOTE ==> Disable right mouse button // return true ; //NOTE ==> Enable right mouse button } } </SCRIPT> <!--SCRIPT ENDS-----------------------------------------------------------------------------------------> <BODY bgColor=#ffffff onmousedown="chkMouse();"> <TABLE cellSpacing=0 cellPadding=0 width=360 border=0> <TR><TD height=6></TD></TR> <TR><TD noWrap align=right height="10"> <SPAN class=clsBkclr id=bkTimer style="LEFT: 10px; WIDTH: 720px; POSITION: absolute; TOP: 23px"></SPAN> <SPAN class=clsTimer id=tmTimer style="Z-INDEX: 1; LEFT: 10px; WIDTH: 720px; POSITION: absolute; TOP: 23px"></SPAN> <SPAN class=clsLiving id=txtLiving style="Z-INDEX: 2; LEFT: 10px; WIDTH: 720px; POSITION: absolute; TOP: 23px"> <SCRIPT LANGUAGE="JavaScript">document.write("Demo ends after " + nLivingTime + " sec")</SCRIPT> </SPAN> </TD></TR> <TR><TD height=6></TD></TR> <TR><TD> <OBJECT id=NV1 codeBase=HE_BORRADO_LA_URL/download/TCP_2.0/nvUnifiedControl.Dll height=480 width=720 classid=CLSID:A6F36F3F-3AE0-458B-AFC4-AA82565E0BF8 VIEWASTEXT></OBJECT> </TD></TR> </TABLE> </BODY> </HTML>