I am working on loggin into an internal site automatically and performing a search.
currently we do this with a perl script so I know it is possible.
in order to do this correctly on the system I am working with I need to do the following
- login to site
- receive and set a cookie from the system
- perform search
I have logged into the site but when I do I receive the following response.
HttpMessage Object
(
[type:protected] => 2
[body:protected] =>
[requestMethod:protected] =>
[requestUrl:protected] =>
[responseStatus:protected] => Moved Temporarily
[responseCode:protected] => 302
[httpVersion:protected] => 1.1
[headers:protected] => Array
(
[Date] => Tue, 14 Jul 2009 13:19:27 GMT
[Server] => Apache/2.0.52 (CentOS)
[Cache-Control] => private
[Expires] => -1
[Set-Cookie] => Array
(
[0] => JSESSIONID=7E91F42DB9AF8C2A121B53F3357F47CD; Path=/docushare
[1] => AmberUser=64.862793904806DB19D7179E6935BF6A434FB36C7DE65E8479873BC31AF0705F0F21.-2uuosmbjw4ozfx4nh09b; Path=/docushare
)
[Location] => http://blue/docushare
[Content-Length] => 0
[Content-Type] => text/plain; charset=UTF-8
)
[parentMessage:protected] =>
)
the Set-Cookie array is what I need to access, but the object is protected. I do NOT need to change the value, I just need to get it and load it into a variable in my script.
how do i get to that array.
there is one other issue here i think. Generally when you log into this site, you see the page that returns this information for a second and then it redirects you to the home page.
I'm not sure if that counts for anything, but i wanted to pass it along.
any help would be great.
Thanks,
C