perl CGI (3)
Visual Basic (1)
How can a perl script automate HTML form transmissions?
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Question:How can a perl script automate HTML form transmissions (GET or POST)?
Answer:See the two examples. The first one fills out a login form with 2 fields ('username', 'password') and does a GET request.
The second snippet fills out the same form but transmits the data with a POST request.
Keep in mind that the target URL has to be the URL that is specified in the action tag of the HTML form. This is usually different from the URL where the form is presented on.