function post($url, $data){//file_get_content
$opts = array('http' =>
array(
'method' => 'POST',
'header' => array ('Content-type: application/x-www-form-urlencoded', 'response-json:true'),
'content' => $data
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
return $result;
}
Last modification:April 4th, 2019 at 11:35 am
© The copyright belongs to the author