an online form? I am trying to eventually retrieve my account balance via
a cron job that will email me the parsed output of the web page that gets
returned from the curl form completion.
The page I am trying to access is https://retire.hartfordlife.com/index.html
and the html block that contains the form is:
<form method="post" name="form1"
action="https://retire.hartford life.com/HartfordOnline/Login"><input
type="hidden" name="target" value="MultiRol e" /> <table width="100%"
border="0" cellspacing="0" cellpadding="2" bgcolor="#e2e9f 1">
<tr>
<td colspan="2"><fo nt color="#000000" face="Verdana, Arial, Helvetica,
sans-serif" size="3"><stron g><font size="2">Hartfo rd<em>Online</em>
Login</font></strong></font></td>
</tr>
<tr>
<td nowrap><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">User
ID</font></td> <td><input type="text" size="18" name="user" tabindex="1"
value=""/></td>
</tr>
<tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">PIN</font></td> <td><input type="password" size="18"
tabindex="2"
name="password" value=""/></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2"
bgcolor="#e2e9f 1">
<tr>
<td nowrap><a tabindex="4"
href="https://retire.hartford life.com/HartfordOnline/ChallengePhrase "><fonts
ize="1" face="Verdana, Arial, Helvetica, sans-serif">Forgot Your
PIN?</font></a><font size="1" face="Verdana, Arial, Helvetica,
sans-serif"><br /><a tabindex="5"
href="HartfordO nline">https://retire.hartford life.com/Enrollment/Enroll">Har
tfordOnline
Enroll</a></font></td> <td><a tabindex="3"
href="javascrip t:document.form s['form1'].submit()"><img src="imgs/lock.gif"
width="13" height="16" border="0" title="ssl"><im g src="imgs/login.gif"
width="39" height="16" border="0" /></a>
</td>
</tr>
</table>
</form>
I don't know how to handle the
_href="javascri pt:document.for ms['form1'].submit()"_ but what is failing to
return the desired page is this command:
/usr/bin/curl -A "Mozilla/4.0" -F user=myuser -F password=mypass wd \
-F form1="https://retire.hartford life.com/HartfordOnline/Login" \
-F target="MultiRo le" https://retire.hartfordlife.com/index.html \
results.html
I would really, really appreciate any help that anyone can offer about the
correct curl command to use to complete this form.