I would like to send a post form with java on a website. I came up with this, but I dont what to do next or if this is even the right way.
URL url = new URL("http://127.0.0.1");
URLConnection conn=url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(data);
the post form looks like this.
<form action="prikaz4.php" method="post">
<select name="igralec"/>
<option value="Kobe Bryant">Kobe Bryant</option>
<option value="Dwayne Wade">Dwayne Wade</option>
<input type="submit" />
</form>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…