1. 程式人生 > >php post請求

php post請求

content ons php host http nts name log manage

public function file_get_contents_post($url, $post){
  $options = array(
    ‘http‘=> array(
      ‘method‘=>‘POST‘,
      ‘content‘=> http_build_query($post),
    ),
  );
  $result = file_get_contents($url,false, stream_context_create($options));
  return $result;
}

file_get_contents_post($_SERVER[‘HTTP_HOST‘]."/Admin/RisManager", array(‘LocalName‘=>$basic_user[‘real_name‘]));

php post請求