1

当我尝试从自己的脚本请求时遇到问题,例如。当我将数据发布到喜欢<form>输入时,testscript.php 到 3parts 域

我的代码看起来像这样

$urltopost = 'https://secure.quickpay.dk/form/';

$opts = array( 
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => $post_string,
  CURLOPT_NOBODY => true,
  CURLOPT_HEADER => false,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_AUTOREFERER => true
);


$curl_connection = curl_init($urltopost); 
curl_setopt_array($curl_connection, $opts ); 
$output = (string) curl_exec($curl_connection); 
curl_close($curl_connection);

我现在的问题是,当我尝试发帖时,它仍然留在我的页面 testscript.php 上,而不是发送给我$urltopost,我需要它,因为我使用支付网关并希望 PHP 来处理请求而不是HTML<form>输入

我的 curl_getinfo() 看起来像这样

Array ( 
    [url] => https://secure.quickpay.dk/form/ 
    [content_type] => text/html 
    [http_code] => 200 
    [header_size] => 357 
    [request_size] => 63 
    [filetime] => -1 
    [ssl_verify_result] => 0 
    [redirect_count] => 0 
    [total_time] => 0.259001 
    [namelookup_time] => 0.000702 
    [connect_time] => 0.02734 
    [pretransfer_time] => 0.134342 
    [size_upload] => 0 
    [size_download] => 0
    [speed_download] => 0 
    [speed_upload] => 0 
    [download_content_length] => -1 
    [upload_content_length] => 0 
    [starttransfer_time] => 0.258987 
    [redirect_time] => 0 
    [certinfo] => Array ( ) 
    [redirect_url] => 
)
4

0 回答 0