fill automatically an html form

Just starting out? Need help? Post your questions and find answers here.
Crystal Noir
User
User
Posts: 38
Joined: Thu May 01, 2003 12:15 am

fill automatically an html form

Post 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 ;)
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

Focus on cgi executable (purebasic) or ASP.NET (complexer)
Crystal Noir
User
User
Posts: 38
Joined: Thu May 01, 2003 12:15 am

Post by Crystal Noir »

don't really understand, could you explain please ?

thx
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

Sorry, misunderstood, imo NOT possible.
Crystal Noir
User
User
Posts: 38
Joined: Thu May 01, 2003 12:15 am

Post by Crystal Noir »

it's not possible ? it must be have a solution to interact with these forms, with an API perhaps ?
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post 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.
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

?
Depends, if the webserver verifies the origin..
Crystal Noir
User
User
Posts: 38
Joined: Thu May 01, 2003 12:15 am

Post 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 ?)
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post 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.
Dare2 cut down to size
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post 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..
Crystal Noir
User
User
Posts: 38
Joined: Thu May 01, 2003 12:15 am

Post by Crystal Noir »

right, but if the webmaster change the page, the soft will not work anymore...
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post 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.
Crystal Noir
User
User
Posts: 38
Joined: Thu May 01, 2003 12:15 am

Post by Crystal Noir »

it works but how to display the final page (after login for example) ?
Post Reply