curl-and-php
COOKIE issue
Date: Thu, 2 Sep 2004 01:14:27 +0300
Hello again,
EPP is the extensible provisioning protocol, mainly
used for domain name registrars, among other similar
things,
but it doesnt matter the point is that you POST XML
commands to a server and get XML replies.
Now my problem is that I post an XML command and
receive a reply like this:
HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=8A3785A7E966DB53416E3A0085FD33A6; Path=/epp; Secure
Content-Type: text/plain
Transfer-Encoding: chunked
Date: Wed, 01 Sep 2004 21:12:52 GMT
Server: Apache Coyote/1.0
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
................MORE XML HERE BLA BLA BLA ......
The first 8 lines are the header which is included
because of CURLOPT_HEADER set to 1.
Now I want to keep the JSESSIONID cookie, and parse
the xml content. Those 2 jobs are independed from
each other (i.e. the value of the JSESSIONID will
not affect the parsing in any way).
So my questions are:
1. Is there a way to get both the header and the
response in separate strings ? From what I can see
there is only one option: CURLOPT_HEADER -> 1, so
that the header *is included*. This is not the same.
(I want to avoid parsing the whole result to
separate header from response myself).
2. Is there a way to get the cookie in a string
automatically ? (I want to avoid parsing the header
in order to get the cookie).
Well thats it, thanx a lot,
Dimitris
______________________________________________________________________________________
http://mobile.pathfinder.gr - Pathfinder Mobile logos & Ringtones!
http://www.pathfinder.gr - Δωρεάν mail από τον Pathfinder!
Received on 2004-09-02