Re: [SOAP] SoapClient::__getCookie?
| From: | Adam Maccabee Trachtenberg | Date: | Mon, 20 Feb 2006 17:12:08 +0000 |
| Subject: | Re: [SOAP] SoapClient::__getCookie? | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2138@lists.php.net to get a copy of this message | ||
On Mon, 20 Feb 2006, Knut Urdalen wrote:
> I need to fetch a cookie set in the SOAP response. I see the SoapClient
> object has a __setCookie() function, but can't find a corresponding
> __getCookie() function. Is there a workaround to fetch cookie values set
> in SOAP response HTTP headers?
There's no built-in way. The hack is to parse the results of
__getLastResponseHeaders(). It should be relatively easy to pick out
the Cookie fields using a regex, tidy, simplexml, dom, etc.
-adam
--
adam@trachtenberg.com | http://www.trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!