Specials | Announcements | Contact | Site Map
Willmaster.com
Hijack-proof forms. Surveys. List building.

Solid, safe website tools.

Whatever your need, Will Bontrager builds powerful software solutions.

Affiliate Cookie Setter
Search WillMaster.com:

WillMaster > Support > CGI Q&A

If you don't find the answer to your question in these archives, ask your CGI question at the Current Master Series CGI Forum.

Automating Posting info into a CGI script

Author Message
22Jul03

Patrick
Subject: Automating Posting info into a CGI script

Hi, I have a cgi program that I would like to autmoate input into. The form info is:

<form action="post.cgi" method="POST" enctype="multipart/form-data">

With several text entry fields and one category field. Basically, what I would like to do is have this cgi form automatically populated and submit in a repetitive fashion with the data used to fill in the fields contained in a text delimited file. Is this possible?

Thanks,
Patrick

22Jul03

Will

[Email]

In response to: Automating Posting info into a CGI script

I don't know how to automatically submit a form existing on a web page. To popuplate the form, see the "Writing Your Own Form Handling Scripts, Part IV" article linked from http://willmaster.com/library/

Not being familiar with your project, I don't know whether or not it would be appropriate to bypass the web page altogether. But if so, your script can use Perl modules LWP::UserAgent and HTTP::Request::Common to send form information with method POST to a remote CGI program, just as if it came from a web page form. The modules can be obtained from http://cpan.org/ The modules are well documented.

22Jul03

Patrick
In response to: Automating Posting info into a CGI script

Hi Will,

Thank you for your prompt response to my post. I have reviewed the tutorials but am not too programming savy. I understand what they are doing etc. but do not think it is something I would be able to do myself. Also, the cgi I am working with is a purchased program so I am not able to get too in depth with how it works in great detail. The form I am using can be found at:

http://www.dubbies.com/cgi-bin/tgp/post.cgi

Basically, there are three mandatory fields that I need to input and submit:

1) email address
2) Gallery URL
3) Category

My goal is to simply have the data to populate these fields in a text file with a character to delimit them:

email@email, http://www.someurl.com, thumb

I would like to have a program pull the details from this file for these three fields and input and submit. Since I cannot get details on the program internals I assume bypassing the webpage might not be feasable.

Could you let me know if you think above would be possible and if a custom programming job is required maybe it would be something you would have interest in. If so, a preliminary price quote would be great as well or continued discussion on the details. I am very eager to move forward but have been spinning in circles trying to find out how to do this or who could do the work for me.

Kind Regards,
Patrick

23Jul03

Will

[Email]

In response to: Automating Posting info into a CGI script

Patrick, you didn't say whether or not the form is actually on your domain.

If dubbies.com is your domain, you might contact the programmer of the post.cgi program to see if s/he is interested in modifying it for you. I would need to see the source code of the program and an example of the database file before I could make even a preliminary price estimate. However, the original programmer is best qualified do modify the script. New programmers need to spend extra time studying the script and then do extensive testing after modification to reduce the chance of inadvertently introducting a bug.

If dubbies.com is not your domain, then you'll need the cooperation of dubbies.com to do what you want to do. The reason is the Passphrase, which is displayed as an image and needs to be copied into the form. I don't know of a way to programmatically extract text displayed within an image file, although it might be possible.

26Jul03

Patrick
In response to: Automating Posting info into a CGI script

Hi Will,

Dubbies.com is my domain. I contacted the programmer and they do not perform any custom work. The passphrase field can be skipped. I can make it mandaotory or optional so that wouldn't be an issue. If you have an interest in pursuing this further can you email me directly and I will then send any info you need - source, db file etc.

Thanks,
Patrick