Advertisement
jmfrolim

Untitled

Oct 20th, 2021
821
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.83 KB | None | 0 0
  1. <?php
  2.  
  3. $curl = curl_init();
  4.  
  5. curl_setopt_array($curl, array(
  6.   CURLOPT_URL => 'https://api.homolog.gofluxbrasil.com.br/login/authenticate',
  7.   CURLOPT_RETURNTRANSFER => true,
  8.   CURLOPT_ENCODING => '',
  9.   CURLOPT_MAXREDIRS => 10,
  10.   CURLOPT_TIMEOUT => 0,
  11.   CURLOPT_FOLLOWLOCATION => true,
  12.   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  13.   CURLOPT_CUSTOMREQUEST => 'POST',
  14.   CURLOPT_POSTFIELDS =>'{"email":"integracao.fertgrow@goflux.com.br","password":"R29mbHV4QDEyMzY1NA==","token":"37a2319a54386dc8f9f3ea4bf2212667c415a2a2e63329f664a89f35910bca3b"
  15. }',
  16.   CURLOPT_HTTPHEADER => array(
  17.     'X-Date: 2021-10-20 7:00:00',
  18.     'Authorization: Bearer 37a2319a54386dc8f9f3ea4bf2212667c415a2a2e63329f664a89f35910bca3b',
  19.     'Content-Type: application/json'
  20.   ),
  21. ));
  22.  
  23. $response = curl_exec($curl);
  24.  
  25. curl_close($curl);
  26. echo $response;
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement