Curl not sending data to link point

PinCrackerGod

New Member
Here is the curl code which i had written\[code\]$url='url to connect to link point'; $port = (port number); $fields = array( 'storename'=>urlencode('storenumber'), 'cardnumber'=>urlencode($row['cnumber']), 'cmonth'=>urlencode($row['cmonth']), 'cyear'=>urlencode($row['cyear']), 'ctype'=>urlencode($row['ctype']), 'securitycode'=>urlencode($row['csecuritycode']), 'chargetotal'=>urlencode($row['camount']), 'customer_ip'=>urlencode($_SERVER['REMOTE_ADDR']), 'submit'=>urlencode('submit'), 'ponumber'=>urlencode('ponumber'), 'totalamount'=>urlencode($row['camount']), 'txntype'=>urlencode('sale'), 'txnmode'=>urlencode('live'), 'mode'=>urlencode('payonly'), 'txnmode'=>urlencode('live'), 'od'=>urlencode($row['id1']), 'osCsid'=>urlencode($_GET['osCAdminID']) ); foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string,'&'); $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_POST,count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string); echo $fields_string; $result = curl_exec($ch); echo"$result";\[/code\]
 
Back
Top