我想在这个网站上提交一个带有 curl 的 html 表单。 http://pickupline.be/bekijk
当您点击“Stem”时,它会向http://pickupline.be/submitVote发送一个帖子表单。
该表单需要以下字段:
<input type="text" id="num" name="num" class="required center_text">
<input type="text" id="firstname" name="fname" class="fname required" >
<input type="text" id="lastname" name="lname" class="lname required" >
<input type="text" id="mail" name="email" class="required email" >
<select name="birthday_day" class="required birthday_day">
<option selected value="">DD</option>
<option value="1">1</option>
<select name="birthday_month" class="required birthday_month">
<option selected value="">MM</option>
<option value="1">1</option>
<select name="birthday_year" class="required birthday_year">
<option selected value="">JJ</option>
<option value="2000">2000</option>
<input type="checkbox" id="chkOpdehoogte" name="newsletter"><label for="chkOpdehoogte">Ik wil op de hoogte blijven van nieuwe inzendingen</label>
<input type="checkbox" id="chkAgreeConditions" name="agree" class="required"><label for="chkAgreeConditions">Ik ga akkoord met het <a href="http://pickupline.be/reglement" target="_blank">reglement</a></label>
<input type="hidden" id="pickupline_id" name="id">
<input type="submit" value="STEM">
请注意,id 是隐藏的。这是我迄今为止尝试过的:
curl -v --data 'num=${nummer}&fname=${voornaam}&lname=${achternaam}&email=${mail}&birthday_day=${dag}&birthday_month=${maand}&birthday_year=${jaar}&agree="yes"&id=100' http://pickupline.be/submitVote --referer http://pickupline.be/bekijk
但是我没有得到服务器的响应。我也尝试保存 cookie 并将它们与 curl 一起使用,没有区别。