2014-04-25 36 views
-6

我有一個PHP代碼:這捲曲帖子還是得到?

$url='https://payment.testingfc.com/TokenPayment.jsp?merchantId='. $merchantid .'&data='.$desEncryptedData; 

$curl = curl_init(); 
curl_setopt($curl, CURLOPT_URL, $url); 
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); 
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); 
$auth = curl_exec($curl); 

這是捲曲POST或GET?

+0

這是一個Get請求 – Professor

回答

2

除非您指定POST ..它是GET。

0

你可以把它像這樣的POST:

<?php 

$post_data = array('merchantId'=>$merchantid, 'data'=>$desEncryptedData); 

$curl = curl_init('https://payment.testingfc.com/TokenPayment.jsp'); 

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); 
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); 
curl_setopt($curl, CURLOPT_POST, 1); 
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data); 
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); 

$result = curl_exec($curl); 

?>