project_id = '1151'; $time = $locomotiveModel->milliseconds(); $time = explode(' ', microtime())[1]; TWXrequest($params); function TWXrequest($params) { // $url = "http://62.141.88.61:8085/Thingworx/Things/connSmoppLibrary/Services/get_sources_of_comments"; $url = "http://qaplatform.digitaldepot.ru:8085/Thingworx/Things/connSmoppLibrary/Services/get_sources_of_comments"; $jsonEncoded = json_encode($params); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); //curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "AppKey: 6a7bdbaa-6bc1-4159-a2f4-07a13c8907d1", "Accept:application/json")); curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "AppKey: 33cd23bb-3b03-4638-afef-7104a13e9211", "Accept:application/json")); curl_setopt($curl, CURLOPT_USERPWD, sprintf('%s:%s', "Smopp", "2050.Digital")); curl_setopt($curl, CURLOPT_TIMEOUT, 60); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonEncoded); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // var_dump($jsonEncoded); $result = curl_exec($curl); // $uuid = json_decode($result)->RemarkId; // echo "uuid ".$uuid; // curl_close($curl); var_dump($result); // var_dump($result); } ?>