im trying to log in to a page using curl to modify one of my post like updating that specific post with new information over the time
i dont understand very much curl and most of the examples i search are in php and i need it to use with autoit or the cmd directly
right now im trying from the start, to get logged in the webpage
i have found that i need the names of the inputs user and password and that i need a cookie to receive and to send, but when i check the curl.txt in a browser it returns me to the login page, here is what i have
this is the page code where i found the inputs vb_login_username and vb_login_password
Code:
<!-- login form -->
<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=384"></script>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td class="smallfont" style="white-space: nowrap;"><label for="navbar_username">Nombre de Usuario</label></td>
<td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="Nombre de Usuario" onfocus="if (this.value == 'Nombre de Usuario') this.value = '';" /></td>
<td class="smallfont" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />¿Recordarme?</label></td>
</tr>
<tr>
<td class="smallfont"><label for="navbar_password">Contraseña</label></td>
<td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
<td><input type="submit" class="button" value="Iniciar Sesión" tabindex="104" title="Escribe tu nombre de usuario y contraseña en los campos para iniciar la sesión o pulsa el botón 'registrarse' para crear un perfil." accesskey="s" /></td>
</tr>
</table>
<input type="hidden" name="s" value="" />
<input type="hidden" name="securitytoken" value="guest" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<!-- / login form -->
and here is the code im trying but i dont get results
Code:
#include <Constants.au3>
#include <GuiConstantsEx.au3>
$sCurl = @TempDir & '\curl.exe'
$sParam = '-b "C:\ cookiefile.txt" -c "C:\ cookiefile.txt" -d vb_login_username= -d vb_login_password= -o "C:\curl.txt" --url http://www.vagos.es'
Run($sCurl & '" ' & $sParam)
hope you can help me
thanks