I was trying to publish messages from PHP and I need to convert the following command into a PHP cURL:
curl -X PUT --data-binary \"Hello World\" http://eclipse
$data = "Hello World"; $ch = curl_init('http://eclipse.mqttbridge.com/test'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch);