The code i've used is
$request = 'sales='.$_slots['sales']['value'].'&duration='.$_slots['duration']['value'];
$ch = curl_init();
curl_setopt( $ch,CURLOPT_URL, $url );
curl_setopt( $ch,CURLOPT_POST, 2 );
curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);
curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $ch,CURLOPT_POSTFIELDS, $request);
$result = curl_exec($ch );
$response = explode(chr(10),$result);
$data = implode('', $response);
$error = curl_error($ch)
curl_close( $ch );
The curl_error also returns null so I have no way to track why its not working. The $url is defined above and is a valid url.I also tried without sending any post but still it does not work.
Any advice would be appreciated.Thanks
$requestvariable properly URL encoded, there is a functionhttp_build_query()for that