【发布时间】:2011-12-22 09:47:11
【问题描述】:
我正在开发一个网站,我正在尝试访问贝宝。所以我正在尝试使用 curl 将存储在我的数据库中的用户信息发送到贝宝服务器。我不知道该怎么做。请问您能在这方面帮助我吗?
我的代码:
$fetSql ="SELECT * FROM `donator` WHERE `donatorId`='".$_REQUEST['donatorId']."'";
//echo $fetSql;
$fetQry =$db->query($fetSql);
$array =$db->fetch_array($fetQry);
$customer_first_name =$array['donatorFName'];
$customer_last_name =$array['donatorLName'];
$example_payment_amuont =$array['amount'];
$customer_address1 =$array['address1'];
$customer_address2 =$array['address2'];
$customer_city =$array['city'];
$customer_state =$array['state'];
$customer_zip =$array['zip'];
$customer_country =$array['country'];
$customer_credit_card_number =$array['cardNo'];
$cc_cvv2_number =$array['cvvNo'];
$cc_expiration_month =$array['expMnth'];
$cc_expiration_year =$array['expYr'];
$currencyCodeType ='GBP';
如何在 curl 中分配这些数据?
【问题讨论】:
-
小Bobby-Tables想来玩。 叹息
-
cURL 是一个用于发出 HTTP 请求的库。您必须以客户端想要的格式构造 HTTP 请求。