greengiant83
14 years agoVisitor
How to post form data to URL
I have a few variable that I need to post to a remote server and get the response back from. Basically, I want to get the results back a server as if I had hit the submit button in the browser on a simple page like this:
<html>
<body>
<form action="http://www.gaiamtv-qa.gaiam.com/api/s/login" method="post">
MyParameter1: <input name="MyParameter1" value="foo" /><br />
MyParameter2: <input name="MyParameter2" value="bar" /><br />
<input type="submit" />
</form>
</body>
</html>
<html>
<body>
<form action="http://www.gaiamtv-qa.gaiam.com/api/s/login" method="post">
MyParameter1: <input name="MyParameter1" value="foo" /><br />
MyParameter2: <input name="MyParameter2" value="bar" /><br />
<input type="submit" />
</form>
</body>
</html>