Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2023 - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Like a real navigator ?

Posted by Franck131313 (Franck131313), 24 March 2005

Does someone know how to ask Perl to open a web page and to wait for an auto validated form to redirect?

This is my problem:
I have to send data in POST to a script (easy with LWP::UserAgent)
The script witch receives data print a page with a form, this form is auto validated with JavaScript.
The second script does the same, etc...;

I can do it with LWP::UserAgent and HTML::Form but I would prefer just to post data to the first script and just wait to redirections to be done (Like a navigator do).

Someone can help me?



Posted by admin (Graham Ellis), 25 March 2005
If you're looking to write your own client program (browser replacement) directly, you'll find a very simple example to get you started at http://earth/resources/ex.php4?item=p405/

a) Data to be added as form parameters via the GET method should be URLencoded (?xxx=yyy&zzz=aaa type stuff) after $page in the GET command.

b) If you cannot use HTTP 1.0 (which is the easier protocol), HTTP 1.1 requires (the host name to be supplie on a separate line I believe.

c) If you're using the POST method, that data too needs to be supplied, encoded, on a separate line.

While you're researching and testing your client, you might find it useful to run an "echo server" to see what you're sending; we've got an example at http://earth/resources/ex.php4?item=p405/pwebserver that you're welcome to start from.

You might find a book such as the HTTP developer's handbook useful if you're not already famililar with the protocols you'll be using.

A word of caution.   If you're writing an automated client (i.e. a robot), please read and comply with the robots exclusion standard.  In a nutshell, this means that you should read the file robots.txt on any site you visit, and comply with any requests they make to avoid automatically reading certain pages.  You should also limit your traffic so as not to perform a denial of service attack by eating up too much bandwidth all at once.

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2023: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho