$url = "http://localhost/index.php/api/";
$post_string = '
EB4RTDHWE5F18BDC8ZJ3
FLIDRBM9S8E8PP9DZ9T319HC8WQCTUSINFFKJ7W3
NewEmail
recurring_cancel
0
Your card has been charged.
'.htmlentities('Test it yo!').'
Electric Function, Inc.
daveryan187@yahoo.com
1
0
';
//echo $post_string;
$postfields = $post_string;
$ch = curl_init();
//curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
if(curl_errno($ch))
{
print curl_error($ch);
}
else
{
curl_close($ch);
echo $data;
}