Tengo mi archivo cookie.php que luce como esto:
Código:
En pantalla sólo me imprime mi IDUserPortal (que es lo mismo que la cookie) al ingresar al portal https://oet.itesm.mx/portal/page/portal/OET/Publica?p_iPortal=3<!DOCTYPE html> <?php $cookie_name = "IDUserPortal"; //$cookie_value = "Value"; setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "https://oet.itesm.mx/portal/page/portal/OET/Publica?p_iPortal=3"); ?> <html> <body> <?php echo $_COOKIE[$cookie_name]; ?> </body> </html>
Y del otro lado tengo este otro código index.php que tiene la función de Single Sign On
Código:
Lo que yo quiero saber es<?php //require_once dirname(__FILE__).'/functions.jsconnect.php'; require('functions.jsconnect.php'); require_once("lib/nusoap.php"); //require('webservice.php'); // 1. Get your client ID and secret here. These must match those in your jsConnect settings. $clientID = "xxx"; $secret = "xxx"; // 2. Grab the current user from your session management system or database here. $signedIn = true; // this is just a placeholder // YOUR CODE HERE. // 3. Fill in the user information in a way that Vanilla can understand. $user = array(); if ($signedIn) { // CHANGE THESE FOUR LINES. $cliente = new nusoap_client("https://oet.itesm.mx/portalOETWS/PortalOETWebService?wsdl"); //$usuario = "0B0430A112F46B62F8B583F89C9B3C29"; <-- Esta es mi cookie que utilizo para iniciar sesión $cveapp = "mapa_mexico_2015"; $parametros = array ('pVusuarioenc'=>$usuario,'cveapp'=>$cveapp); $respuesta = $cliente->call("validausuario",$parametros); $user['uniqueid'] = $respuesta['pvatributo1Out']; $user['name'] = $respuesta['pvatributo3Out'].$respuesta['pvatributo4Out']; $user['email'] = $respuesta['pvatributo6Out']; } // 4. Generate the jsConnect string. // This should be true unless you are testing. // You can also use a hash name like md5, sha1 etc which must be the name as the connection settings in Vanilla. $secure = 'sha1'; WriteJsConnect($user, $_GET, $clientID, $secret, $secure); JsSSOString($user, $clientID, $secret);
1) Cómo puedo pasar el valor de $cookie_name (cookie.php) hacia index.php específicamente dentro de if ($signedIn) { ?
2) Intenté pegar todo el código de cookie.php en Index.php y no me arrojó resultados