Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

How to load a HTML page full of hidden data in a script?



11:30 pm on Mar 8, 2006 (gmt 0)

Inactive Member
Account Expired


I am wondering if there's any way I can write a script to be able to mimic a user clicking a Submit button on a web page? I understand I can do $ua->request(POST 'http://somewhere/foo.cgi', [name => 'me', gender => 'F']); to pass in the key/value pairs into a cgi script. But my problem is I have all these key/value pairs already stored in a HTML file and don't want to write a parser to get these key/value pairs to be used in my script. I want to find a way to load this HTML page full of hidden key/value data and add in the Submit button to be pushed to the cgi script which process the data.

Any suggestions? Thanks very much.

8:21 am on Mar 9, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 5, 2006
votes: 0

I can't figure out what you are asking.
8:21 am on Mar 10, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 12, 2003
votes: 0

If you're talking about a page you own, you can use Javascript to Submit the form. If the form resides on a page you don't own, I don't think there's a way to Submit the form remotely from your own script.