Page 1 of 1
fill automatically an html form
Posted: Tue May 30, 2006 2:36 pm
by Crystal Noir
hi all
I wonder, do you know how to make a program witch can go tio a specific url and fill the html form there is ?
For example , a safelist, when you go on a form page on the web, the program fill automatically the form with informations you have set before (like robotform).
thx in advance

Posted: Tue May 30, 2006 2:50 pm
by Edwin Knoppert
Focus on cgi executable (purebasic) or ASP.NET (complexer)
Posted: Tue May 30, 2006 2:52 pm
by Crystal Noir
don't really understand, could you explain please ?
thx
Posted: Tue May 30, 2006 2:56 pm
by Edwin Knoppert
Sorry, misunderstood, imo NOT possible.
Posted: Tue May 30, 2006 3:03 pm
by Crystal Noir
it's not possible ? it must be have a solution to interact with these forms, with an API perhaps ?
Posted: Tue May 30, 2006 3:15 pm
by ricardo
Its possible, but hard.
IF you know exactly how this specifici form is, you can "fill it" in memory and then use the POST example (
http://www.purebasic.fr/english/viewtop ... ost+server) to send it to the server.
Posted: Tue May 30, 2006 3:30 pm
by Edwin Knoppert
?
Depends, if the webserver verifies the origin..
Posted: Tue May 30, 2006 3:46 pm
by Crystal Noir
this example is cool but how to display the result in the web browser gadget ? (and not copy the html source to clipboard ?)
Posted: Tue May 30, 2006 3:55 pm
by Dare
I am not sure about this, but I think you would have to make a plugin for the browser. Something that can intercept the html, find the form input fields, and stick in the values.
But .. search out some of Freak's (and possible Sparkie's) code snippets, as there may be a way if you are using it in the webgadget with Pure.
Posted: Tue May 30, 2006 4:01 pm
by thefool
You could simple use api (or something like autoit) to send key commands to the page. Eg; TAB -> name -> TAB -> email..
This way you would need to know the positions of the textboxes and so on, but it would work. And its simple..
Posted: Tue May 30, 2006 4:11 pm
by Crystal Noir
right, but if the webmaster change the page, the soft will not work anymore...
Posted: Wed May 31, 2006 12:22 pm
by Pantcho!!
You can download the html file.
Parse the fields from <FORM> ... </FORM>
then you will know what kind of data it needs.
Then use the POST command to post the data to the webserver holding the form. if the webserver has some kind of protection it can be or AUTH (which mean u need Login/Pass but i doubt that thats what you need) or it checks the REFRER tag in the html POST header.
For using the POST with http search the forum for a code. for more info on REFRER tag search the HTML RFC.
good luck.
Posted: Thu Jun 01, 2006 12:58 pm
by Crystal Noir
it works but how to display the final page (after login for example) ?