Jump to content

Auto fill html page using url.


Antonios

Recommended Posts

I want to call a url string that loads an html page which does the following: inserts username and password and then fills some html fields with values I am going to insert automatically and finally submit the whole thing. in other words something like: http://www.asite.com/username=...and password=....and name=...and text=...... and finally submit without clicking a button.The user in other words will never have to click on anything. Any help would be appreciated.

Link to comment
Share on other sites

You'll need a server side language for that.Given the URL: page.php?username=...&password=...&name=...&text=...You process the variables like this:<?php$user = $_GET['username'];$pass = $_GET['password'];$name = $_GET['name'];$text = $_GET['text']; //And do something with them, for example, put these variables into a database:$con = mysql_connect(... ... ...); // check W3schools for reference on thismysql_select_db("db",$con); // check W3schools for reference on thismysql_query("INSERT INTO table (user,pass,name,text) VALUES('$user','$pass','$name','$text')");?>

Link to comment
Share on other sites

I want to construct the url from within a VB program and then use the url to do what I described. The username and password would be fixed but the text, name etc would be filled my variables. Then I was under the impression that if the url string was loaded on a IE or firefox it might work, present me with the web page filled with my values from the url, after automatically bypassing the password. Am I correct?

Link to comment
Share on other sites

passing variables in the url only works if the destination form is setup to recognize url variables, which it most likely will not be. You can bypass the form and submit to the action url and setup the headers, etc with your desired values.

Link to comment
Share on other sites

I wrote this "https://www.asite.gr/index.php?emobile=6971234567", where asite is a corporate site and cannot disclose it, and it filled the html text field with it. So it works. The only two problems I have is filling the password field as well and of course click the submit button automatically without user interaction. Any ideas? Thanks until now for the help I did get some ideas. The project is that the user should click a button and everything happens without him ever seeing the asite web page.

Link to comment
Share on other sites

You don't seem to understand something.--> A form submits its data to a certain page.Example:form.html sends username, password, name and text to process.phpprocess.php does something with username, password, name and text (for example, puts it into a database).--> You seem to want to send data to the form, and them make the form send the data.Example:You make form.html put your data into the username, password, name and text fields and then make it submit this data to process.phpprocess.php does something with username, password, name and text.--> You should send the data directly to process.php and let it use that data.Example:process.php receives username, password, name and text from you and does something with it (for example, puts it into a database)

------

One last problem:You can't use URLs to put data into the text fields anyways, unless the page is programmed to do that.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...