Date: 10/15/01
- Next message: Marcus James Christian: "[PHP] Q:Why would anyone use ssLang other than PHP? Where would advantage be?"
- Previous message: sunny AT wde: "[PHP] need to send customised mails from db, please help! :("
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I am looking to write a script that takes in a user id and a password, matches them with credit card number and other info from a MySQL database and then sends it with a GET form command to a remote cgi script.
<form action="cgi script" method="get">
//input user id
//input password
<?php
//connect to dbase
//find matching order info
//prepare string for get submit
?>
//submit button
</form>
How do I submit a certain string as a "GET" to a certain remote cgi? Am I making sense at all? How do I choose what gets sent out as a "GET"?
How can I make it secure?
Here is the PERL example that the payment gateway gives:
$Postvals = "merchant=$merchantname&password=$password&operation_type=$operation_type&";
$Postvals .= "orderid=$orderid&total=$total&cardname=$cardname&";
$Postvals .= "cardnum1=$cardnum1&cardnum2=$cardnum2&cardnum3=$cardnum3&cardnum4=$cardnum4&";
$Postvals .= "cardexpm=$cardexpm&cardexpy=$cardexpy&nameoncard=$nameoncard&cardstreet=$cardstreet&";
$Postvals .= "cardcity=$cardcity&cardstate=$cardstate&cardzip=$cardzip&cardcountry=$cardcountry";
use LWP::UserAgent;
use Crypt::SSLeay;
$ua = new LWP::UserAgent;
$ua->agent("SSL/0.1");
my $req = new HTTP::Request('POST', 'https://www.goemerchant7.com/cgi-bin/gateway/gateway.cgi');
$req->content_type('application/x-www-form-urlencoded');
$req->content($Postvals);
my $res = $ua->request($req);
$Result = $res->content;
($success, $authcode, $authresponse, $avscode, $oid) = split(/\|/, $Result);
Any ideas?
Thank in advance,
Shay Horowitz
Shoguntrader
www.shoguntrading.com
- Next message: Marcus James Christian: "[PHP] Q:Why would anyone use ssLang other than PHP? Where would advantage be?"
- Previous message: sunny AT wde: "[PHP] need to send customised mails from db, please help! :("
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

