如何在Rebol中发送http get来下载wordpress xml备份文件?

时间:2009-08-20 17:20:04

标签: rebol

我想使用rebol从

下载我的博客的xml备份

http://reboltutorial.com/wp-admin/export.php

表单是

<form action="" method="get">
<h3>Options</h3>

<table class="form-table">
<tr>
<th><label for="author">Restrict Author</label></th>
<td>
<select name="author" id="author">
<option value="all" selected="selected">All Authors</option>
<option value='1'>admin</option></select>
</td>
</tr>
</table>
<p class="submit"><input type="submit" name="submit" class="button" value="Download Export File" />
<input type="hidden" name="download" value="true" />
</p>

</form>

我想我首先需要登录http://reboltutorial.com/login/然后才能登录? 任何代码示例做类似的事情(获取cookie,...)?

<form name="loginform" id="loginform" action="" method="post">
    <p>
        <label>Username<br />
        <input type="text" name="log" id="user_login" class="input" value="" size="20" /></label>
    </p>
    <p>

        <label>Password<br />
        <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" /></label>
    </p>
    <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" /> Remember Me</label></p>
    <p class="submit">
        <input type="hidden" name="post-from" id="post-from" value="page" />
        <input type="hidden" name="action" id="action" value="login" />

        <input type="submit" name="wp-submit" id="wp-submit" value="Log In" />
        <input type="hidden" name="redirect_to" value="http://reboltutorial.com/wp-admin/" />
        <input type="hidden" name="testcookie" value="1" />
    </p>
</form>

1 个答案:

答案 0 :(得分:1)