我想为我的同学创建一个应用程序(C++)。如何在不输入密码的情况下发送用户名和密码?
通常他们必须去我们的学校网站并进入登录网站。 在那里,他们键入他们的用户名和密码,登录并搜索他们自己的课程。
我希望我的应用程序要求他们提供课程,用户名和密码,将其发送到时间表网站,下载url并为他们打印时间表。
我只编程C++,所以除了“发送用户名和密码到站点”步骤之外,我没有任何问题。我知道HTML的基础知识,所以我认为我必须搜索网站使用的变量名称,并以某种方式将它们与网址一起发送?我尝试了一些东西,但我不明白整个事情是如何工作的。
<label id="username-lbl" for="username" class="required" aria-invalid="false">
"Benutzername"
<span class="star"> *</span></label>
<input type="text" name="username" id="username" value class="validate-username required" size="25" required aria-required="true" autofocus>
这是用户名字段的HTML。我必须写如
...URL....\index.html&username="theusername"
因为id是“用户名”? 我试过这个,它没有工作..我在互联网上搜索了很多,但我没有找到答案。
你不需要引号,第一个变量应该以'?'而不是'&'开头。 EG'... URL .... \ index.html?username = theusername&otherVariable = other' http://html.net/tutorials/php/lesson10.php – GrumpyCrouton
登录HTML FORM如何在您尝试的网站上显示登录? –
你需要在表单中检查属性'method',如果它是'get',你可以发送url中的变量,如果它是'post'(因为它应该发送像密码这样的敏感数据),你不能做就这样。 – MarioZ