Foros del Web » Programando para Internet » PHP »

[SOLUCIONADO] Login en PHP

Estas en el tema de Login en PHP en el foro de PHP en Foros del Web. hola buenas . tengo un php que conecta con un webservice: Código PHP: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="is-IS"> <head profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>NAV Web Service via PHP</title> </head> <body> <?php define ( 'USERPWD' , ...
  #1 (permalink)  
Antiguo 05/10/2015, 07:30
 
Fecha de Ingreso: febrero-2011
Ubicación: Barcelona
Mensajes: 195
Antigüedad: 13 años, 2 meses
Puntos: 1
Login en PHP

hola buenas . tengo un php que conecta con un webservice:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="is-IS">

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>NAV Web Service via PHP</title>
</head>
<body>

<?php

define
('USERPWD','128.20.1.1\jconesa:jconesa'); // Sustituir xxx por la contraseña del servidor 
include("NTLMStream.php");  
include(
"NTLMSoapClient.php");
 
stream_wrapper_unregister('http');
stream_wrapper_register('http','NTLMStream') or die("Fallo al registrar protocolo");
$pageURL =  'http://128.20.1.1:7047/DynamicsNav/WS/1%20TPS-N_LAB/Codeunit/WSTrucksAut'// El Web Service 
$params = array();
$params["user"] = "JCONESA"// param1 es el nombre el primer parámetro.
$params["password"] = "12345";
$client = new NTLMSoapClient($pageURL);
stream_wrapper_restore('http');
$result $client->LoginCheck($params); // El método del Web Service 
$numped $result->return_value;
echo 
'CONEXION REALIZADA CON EXITO: '.$numped;
die();

?>


</body>
</html>

BUeno en resumen, esto se conecta a un servidor en windows y se hace login con un ERP.

,mi pregunta es como podria crear un login para que se pudieran autentificar via web
  #2 (permalink)  
Antiguo 05/10/2015, 19:34
Avatar de mortiprogramador
Colaborador
 
Fecha de Ingreso: septiembre-2009
Ubicación: mortuoria
Mensajes: 3.805
Antigüedad: 14 años, 7 meses
Puntos: 214
Respuesta: Login en PHP

<saludo>
Pues haciendo un formulario que pida los datos,
y luego haciendo que las variables que lleguen
del formulario sean las que vayan al array de datos.


$params["user"] = campo_user_del_formulario;
$params["password"] =
campo_pass_del_formulario;

</saludo>


__________________
"Si consigues ser algo más que un hombre, si te entregas a un ideal, si nadie puede detenerte, te conviertes en algo muy diferente."
Visita piggypon.com

Etiquetas: html, login
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 19:21.