Home > Archive > PERL CGI Beginners > March 2005 > Send equivalent of this via perl
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Send equivalent of this via perl
|
|
| Angus Comber 2005-03-14, 8:55 pm |
| Hello
I have been given this form:
<form target="company1" action=https://www.company1.com/cgi-bin/webscr
method="post">
<input type="image"
src="https://www.company1.com/en_GB/i/btn/x-click-but22.gif" border="0"
name="submit" alt="Web payment">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="someemailaddr@aaa.com">
<input type="hidden" name="item_name" value="My First Item">
<input type="hidden" name="item_number" value="IVWorld02">
<input type="hidden" name="amount" value="45.00">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
</form>
But I want to use my own form so that when user clicks submit button a
perl script will run which then decides which attribute values to send to
the "https://www.company1.com/cgi-bin/webscr" program. Eg I want to be
able to send item_number = value obtained when user clicks subm it.
Is this possible? Will the program (or whatever it is) webscr just
behave any differently if passed by a perl script as by this form above?
What perl code would send the equivalent information to the webscr cgi
program?
Basically any pointers as to how I achieve this would be most helpful.
Angus Comber
angus@NOSPAMiteloffice.com
| |
| Lawrence Statton 2005-03-14, 8:55 pm |
| > Hello
>
> I have been given this form:
>
> But I want to use my own form so that when user clicks submit button a
> perl script will run which then decides which attribute values to send to
> the "https://www.company1.com/cgi-bin/webscr" program. Eg I want to be
> able to send item_number = value obtained when user clicks subm it.
>
Let me see if I understand correctly: You want to interpose a program
you write, so that in place of goign direct to Paypal, they send the
request to your server, where you massage it in some nefarious way,
and then forward the massaged data to Paypal on their behalf?
Why not just put the data you want into the original form?
> Is this possible? Will the program (or whatever it is) webscr just
> behave any differently if passed by a perl script as by this form above?
> What perl code would send the equivalent information to the webscr cgi
> program?
It is, in theory, possible -- LWP can be built with HTTPS support - so
the first step would be to write a script to simulate a user posting
the Paypal form.
> Basically any pointers as to how I achieve this would be most
helpful.
The shortest path would really be to "put the correct data in the form
before the users posts"
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - lawrenabae@abaluon.abaom s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
| |
| Randal L. Schwartz 2005-03-16, 3:55 pm |
| >>>>> "Lawrence" == Lawrence Statton <lawrence@cluon.com> writes:
Lawrence> Let me see if I understand correctly: You want to interpose a program
Lawrence> you write, so that in place of goign direct to Paypal, they send the
Lawrence> request to your server, where you massage it in some nefarious way,
Lawrence> and then forward the massaged data to Paypal on their behalf?
"My spider sense is tingling."
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
|
|
|
|
|