Does this code look right to you? I am trying to use a direct socket to connect to my payment gateway and I really don't know how curl works
I execute this in my browser and all I get is "Response:" echoed out to the browser, I should be getting someting else I think
<?php
$url = 'https://trans.pay-me-now.com/cgi-bin/trans.cgi';
$params = "action=ns_quicksale_cc&ecxid=TEST0&amount=1.00&ccname=joe%20smith&ccnum=1234567891234567&expmon=05&expyear=2005&";
$user_agent = "";
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$result = curl_exec ($ch);
curl_close ($ch);
echo("Response:" . "$result");
?>