如何在Oracle PL / SQL中stream_context_create

时间:2018-08-02 16:36:35

标签: oracle plsql

如何在Oracle中使用与php“ stream_context_create”中类似的代码,我想将内容推送到Web视图中以获得下一步的结果。

function http_request_post_login($username,$password){
  $loginURL = 'http://mydomain/user/login';
  $json = '{"username":"' . $username . '","password":"'. $password . '"}';

$options = array(
    'http' => array(
        'header'  => "Content-type: application/json",
        'method'  => 'POST',
        'content' => $json,
    ),
);

$context = stream_context_create( $options );

$result = file_get_contents( $loginURL, false, $context );


return $result;
}

0 个答案:

没有答案