Advertisement
jamboljack

Open DB Accurate

Oct 14th, 2023
1,146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1. public function koneksiaccurate()
  2.     {
  3.         $dataMeta    = $this->db->get_where('app_meta', array('meta_id' => 1))->row();
  4.         $accessToken = $this->gettoken();
  5.         $IDAccurate  = $dataMeta->meta_id_accurate;
  6.         $header      = array(
  7.             "Authorization: Basic " . $accessToken,
  8.         );
  9.  
  10.         $url  = "https://account.accurate.id/api/open-db.do?id=" . $IDAccurate;
  11.         $opts = array("http" => array(
  12.             "method"        => "GET",
  13.             "header"        => $header,
  14.             "ignore_errors" => true,
  15.         ),
  16.         );
  17.         $context  = stream_context_create($opts);
  18.         $response = file_get_contents($url, false, $context);
  19.         print_r($response);
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement