I'm new to cURL, can we do the same thing in httpclient and httppost? If yes, what is the equivalent code for the cURL below.
$xml = '<test>';
$xml .= '<date>'.date("d/m/Y", time()).'</date>';
$xml .= '<time>'.date("H:m:s", time()).'</time>';
$xml .= '<param>'.$input.'</param>';
$xml .= '</test>';
// get the host
$curl=curl_init("http://someurl.com");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($curl, CURLOPT_VERBOSE, 1); // debug
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (FD)");
curl_setopt($curl, CURLOPT_POSTFIELDS, $xml);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
$response = curl_exec($curl);