Por ejemplo probemos con lo mas simple del mundo
Código PHP:
create_sess.php
session_start();
$_SESSION['my_sess'] = 'some session value';
y entonces ejecutamos en el browser
Código PHP:
http://localhost/create_sess.php
Hasta aqui todo bien, se crea una sesion simple de prueba, pero ahora intenten haciendo lo siguiente
Código PHP:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://localhost/create_sess.php');
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
$content = curl_exec($ch);
curl_close($ch);
Es aqui donde vienen los problemas, la sesion no se crea, alguien me puede decir por que?