Guest User

Untitled

a guest
Dec 12th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. $cparams = array(
  2. "ssl"=>array(
  3. "verify_peer"=>true,
  4. "verify_peer_name"=>true,
  5. ),
  6. 'http' => $request['httpOptions']
  7. );
  8.  
  9. $context = stream_context_create($cparams);
  10. $fp = fopen($request['url'], 'rb', false, $context);
  11.  
  12. $url = EZPAY_SERVER . "/hps/webservice/ezpay/CreateSessionKey";
  13.  
  14. $cparams = array(
  15. "ssl"=>array(
  16. "verify_peer"=>true,
  17. "verify_peer_name"=>true,
  18. ),
  19. 'http' => $request['httpOptions']
  20. );
  21. $ch = curl_init();
  22.  
  23. curl_setopt($ch, CURLOPT_URL,$request['url']);
  24. curl_setopt($ch, CURLOPT_POST, 1);
  25. curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($cparams));
  26.  
  27. // receive server response ...
  28. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  29.  
  30. $server_output = curl_exec ($ch); print_r($server_output);
  31.  
  32. curl_close ($ch);
Add Comment
Please, Sign In to add comment