documentation-samples/archive-authoring-api-samples/php/add-utterances.php [52:72]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function SendPost ($uri, $key, $content) {

	echo "POST " . $uri;

	$headers = "Content-type: text/json\r\n" .
		"Ocp-Apim-Subscription-Key: $key\r\n";

	// NOTE: Use the key 'http' even if you are making an HTTPS request. See:
	// http://php.net/manual/en/function.stream-context-create.php
	$options = array (
		'http' => array (
			'header' => $headers,
			'method' => 'POST',
			'content' => $content
		)
	);
	// Perform the Web request and get the JSON response
	$context  = stream_context_create ($options);
	$result = file_get_contents ($uri, false, $context);
	return $result;
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



documentation-samples/authoring-api-samples/php/add-utterances.php [45:65]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function SendPost ($uri, $key, $content) {

	echo "POST " . $uri;

	$headers = "Content-type: text/json\r\n" .
		"Ocp-Apim-Subscription-Key: $key\r\n";

	// NOTE: Use the key 'http' even if you are making an HTTPS request. See:
	// http://php.net/manual/en/function.stream-context-create.php
	$options = array (
		'http' => array (
			'header' => $headers,
			'method' => 'POST',
			'content' => $content
		)
	);
	// Perform the Web request and get the JSON response
	$context  = stream_context_create ($options);
	$result = file_get_contents ($uri, false, $context);
	return $result;
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



documentation-samples/quickstarts/change-model/php/add-utterances.php [45:65]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function SendPost ($uri, $key, $content) {

	echo "POST " . $uri;

	$headers = "Content-type: text/json\r\n" .
		"Ocp-Apim-Subscription-Key: $key\r\n";

	// NOTE: Use the key 'http' even if you are making an HTTPS request. See:
	// http://php.net/manual/en/function.stream-context-create.php
	$options = array (
		'http' => array (
			'header' => $headers,
			'method' => 'POST',
			'content' => $content
		)
	);
	// Perform the Web request and get the JSON response
	$context  = stream_context_create ($options);
	$result = file_get_contents ($uri, false, $context);
	return $result;
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



