I have a fixed username password and one variable text.
this is first method but it’s not safe:
<form action="http://site.com/foo.php" method="post">
<input type="hidden" name="username" value="user123" />
<input type="hidden" name="password" value="pass123" />
<input type="text" name="text" />
<input type="submit" />
</form>
this is secound method Please complete this:
index.html
<form action="foo.php" method="post">
<input type="text" name="text" />
<input type="submit" />
</form>
foo.php
$username = "user123";
$password = "pass123";
$text = $_POST["text"];
$url = "http://site.com/foo.php?text=".$text."&password=".$password."&username=".$username;
HOW TO post $url safe? (without HTTPS)
Use the MD5 function.
e.g.
Then on the receiving site (
http://example.com/foo.php?...), check the received password with a hash (MD5) of the actual password.Example:
sending file:
receiving file: