function km200_SetData( $REST_URL, $Value ) { $content = json_encode( array( "value" => $Value ) ); $options = array( 'http' => array( 'method' => "PUT", 'header' => "Content-type: application/json\r\n" . "User-Agent: TeleHeater/2.2.3\r\n", 'content' => km200_Encrypt( $content ) ) ); $context = stream_context_create( $options ); @file_get_contents( 'http://' . km200_gateway_host . $REST_URL, false, $context ); }