protected createStreamContext ( mixed $content, string $contentType ) | ||
$content | mixed | |
$contentType | string | mime type |
protected function createStreamContext($content, $contentType)
{
return stream_context_create(array('http' => array('method' => 'POST', 'header' => "Content-Type: {$contentType}", 'content' => $content)));
}