Ver Mensaje Individual
  #7 (permalink)  
Antiguo 09/03/2013, 23:34
Avatar de cadrogui
cadrogui
 
Fecha de Ingreso: junio-2003
Mensajes: 875
Antigüedad: 20 años, 10 meses
Puntos: 5
Respuesta: cURL dos consultas al mismo sitio y cookie, no funciona

si, siempre es la misma

el log:

Código:
* About to connect() to civil.poderjudicial.cl port 80 (#0)
*   Trying 200.111.114.20...
* connected
* Connected to civil.poderjudicial.cl (200.111.114.20) port 80 (#0)
> GET /CIVILPORWEB/ HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0
Host: civil.poderjudicial.cl
Accept: */*

< HTTP/1.1 200 OK
< Date: Sun, 10 Mar 2013 05:36:23 GMT
< Server: IBM_HTTP_Server
< Content-Length: 945
* Added cookie JSESSIONID="00006mT75qH97EOv-zRwCaS4oRG+zwasportal02-1" for domain civil.poderjudicial.cl, path /, expire 0
< Set-Cookie: JSESSIONID=00006mT75qH97EOv-zRwCaS4oRG+zwasportal02-1; Path=/
* Added cookie FLG_Version="0" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: FLG_Version=0; Path=/CIVILPORWEB
* Added cookie FLG_Turno="0" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: FLG_Turno=0; Path=/CIVILPORWEB
* Added cookie CRR_IdFuncionario="1" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: CRR_IdFuncionario=1; Path=/CIVILPORWEB
* Added cookie COD_TipoCargo="2" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: COD_TipoCargo=2; Path=/CIVILPORWEB
* Added cookie COD_Tribunal="1000" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: COD_Tribunal=1000; Path=/CIVILPORWEB
* Added cookie COD_Corte="90" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: COD_Corte=90; Path=/CIVILPORWEB
* Added cookie COD_Usuario="autoconsulta1" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: COD_Usuario=autoconsulta1; Path=/CIVILPORWEB
* Added cookie GLS_Tribunal="Tribunal de Prueba" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: GLS_Tribunal=Tribunal de Prueba                                ; Path=/CIVILPORWEB
* Added cookie GLS_Comuna="Santiago" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: GLS_Comuna=Santiago; Path=/CIVILPORWEB
* Added cookie COD_Ambiente="1" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: COD_Ambiente=1; Path=/CIVILPORWEB
* Added cookie COD_Aplicacion="2" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: COD_Aplicacion=2; Path=/CIVILPORWEB
* Added cookie GLS_Usuario="Juan Pe?a Perez" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: GLS_Usuario=Juan Pe?a Perez; Path=/CIVILPORWEB
* Added cookie HORA_LOGIN="02:36" for domain civil.poderjudicial.cl, path /CIVILPORWEB, expire 0
< Set-Cookie: HORA_LOGIN=02:36; Path=/CIVILPORWEB
< Expires: Thu, 01 Dec 1994 16:00:00 GMT
< Cache-Control: no-cache="set-cookie, set-cookie2"
< Content-Type: text/html;charset=ISO-8859-1
< Content-Language: en-US
< 
* Connection #0 to host civil.poderjudicial.cl left intact
----------------------------------------------------- segunda conexion --------------- 
* Re-using existing connection! (#0) with host (nil)
* Connected to (nil) (200.111.114.20) port 80 (#0)
> POST /CIVILPORWEB/AtPublicoDAction.do HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0
Host: civil.poderjudicial.cl
Accept: */*
Referer: http://civil.poderjudicial.cl/CIVILPORWEB/AtPublicoViewAccion.do?tipoMenuATP=1
Cookie: HORA_LOGIN=02:36; GLS_Usuario=Juan Pe?a Perez; COD_Aplicacion=2; COD_Ambiente=1; GLS_Comuna=Santiago; GLS_Tribunal=Tribunal de Prueba; COD_Usuario=autoconsulta1; COD_Corte=90; COD_Tribunal=1000; COD_TipoCargo=2; CRR_IdFuncionario=1; FLG_Turno=0; FLG_Version=0; JSESSIONID=00006mT75qH97EOv-zRwCaS4oRG+zwasportal02-1
Content-Length: 271
Content-Type: application/x-www-form-urlencoded

* upload completely sent off: 271 out of 271 bytes
< HTTP/1.1 200 OK
< Date: Sun, 10 Mar 2013 05:36:23 GMT
< Server: IBM_HTTP_Server
< Transfer-Encoding: chunked
< Content-Type: text/html;charset=ISO-8859-1
< Content-Language: en-US
< 
* Connection #0 to host (nil) left intact
* Closing connection #0

el tema central esl el JSESSIONID, lo que hice hace un rato fue en curlopt_cookie puse solamente el jsessionid copiado de la cookie del navegador y simplemente funciono, pero al cambiarlo... nada...

gracias.
__________________
La mejor manera de aprender es por medio de un aprendizaje significativo....

http://www.cocert.cl

Última edición por cadrogui; 09/03/2013 a las 23:41