I've seen some similar articles but this is specific to login URL's and cookies.
here is the form I'm trying to emulate:
<form action="http://www.myserver.com/login/" method="post" enctype="multipart/form-data" style='display: inline; margin: 0;'>
<table cellpadding="2" cellspacing="0">
<tr>
<td valign="middle" style="text-align:right; width:150px;"><b>Username:</b></td>
<td><input name="username" class="input" type="text" value="Username" style="width:150px;" onfocus="if (this.value == 'Username') this.value='';" /></td>
</tr>
<tr>
<td valign="middle" style="text-align:right;"><b>Password:</b></td>
<td><input name="password" class="input" type="password" value="Password" style="width:150px;" onfocus="if (this.value == 'Password')this.value='';" /></td>
</tr>
<tr>
<td><input type="hidden" name="login" value="login" style="display:none;" /></td>
<td><input class="button" type="submit" name="login" value="Login" /></td>
</tr>
</table>
</form>
I'm trying to create an http post with the url:
http://www.myserver.com/login and the parameters: &username=myusername&password=mypassword so far it isn't working. Normally, I don't have any problem posting forms like this, I'm wondering if there is a missing parameter I should be sending since this is a login? I'm expecting to get back some kind of logged in cookie, but I just get the login page back. I've used LiveHTTPHeaders firefox plugin to watch the login with a browser, but not having much luck figuring this one out, here is the output of liveHTTPHeaders for a sucessful login:
http://www.myserver.com/login/
POST /login/ HTTP/1.1
Host: www.myserver.com
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://www.myserver.com/login/
Cookie: maintab=0; PHPSESSID=1fa3e2dd2df4513c6f8fde7666c87e12; logged=-1; username=-1; password=-1; indextab=0
Content-Type: multipart/form-data; boundary=---------------------------1025921153510616708590357944
Content-Length: 526
-----------------------------1025921153510616708590357944
Content-Disposition: form-data; name="username"
MyTestUserName
-----------------------------1025921153510616708590357944
Content-Disposition: form-data; name="password"
MyTestPassword
-----------------------------1025921153510616708590357944
Content-Disposition: form-data; name="login"
login
-----------------------------1025921153510616708590357944
Content-Disposition: form-data; name="login"
Login
-----------------------------1025921153510616708590357944--
HTTP/1.1 302 Moved Temporarily
Date: Wed, 12 Oct 2011 07:59:23 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By: PHP/5.2.13
Set-Cookie: logged=yes; expires=Thu, 11-Oct-2012 07:59:23 GMT; path=/
Set-Cookie: username=roku; expires=Thu, 11-Oct-2012 07:59:23 GMT; path=/
Set-Cookie: password=9085ca0fba6e1fde827726370fdca48d; expires=Thu, 11-Oct-2012 07:59:23 GMT; path=/
Location: http://myserver.com/home/
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html