How to programatically push the button?

<form action="login.php" method="get">

<input type="text" name="guest" id="login">

<input type="image" src="/login.gif"

</form>

How can I programatically log in as user "xyz"?

[402 byte] By [quereinsteigera] at [2007-11-27 4:52:41]
# 1

Hi,

Therefor that it is just an form script using the get method you can send the data throught a link:

login.php?login=xyz

xyz is your user name, an login is your variable. I would say that this method is shorter and more easer to program than any program. In case that you want to have somebody been recognize you should use cookies:

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/Cookie.html

betlora at 2007-7-12 10:06:46 > top of Java-index,Core,Core APIs...
# 2
I already tried "login.php?login=xyz". If I write this into the browser manually, it works. If I do it programatically, I get the login page content. Not so easy.
quereinsteigera at 2007-7-12 10:06:46 > top of Java-index,Core,Core APIs...
# 3

I guess it is easer for u to use php, even so this is an java forum i would recomend it for you. The code would be something like this:

<?php

header("Location: login.php?login=xyz");

?>

If u like to do it with java, I would say that u have to write somekind of htmlbrowser for java. Therefore it would be the best to use the following packages:

javax.swing.text.html

http://java.sun.com/j2se/1.5.0/docs/api/index.html

and

java.net

http://java.sun.com/j2se/1.5.0/docs/api/index.html

betlora at 2007-7-12 10:06:46 > top of Java-index,Core,Core APIs...