Process.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Process extends CI_Controller {
public function index()
{
$this->load->view('process');
//echo "test";
}
}
process.php
<?php
$curl = curl_init();
$auth_data = array(
'client_id' => '30b5f5beeccfba1dbcb31941523d5e3b',
'client_secret' => ' ',
'grant_type' => 'client_credentials'
);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $auth_data);
curl_setopt($curl, CURLOPT_URL, 'https://authentication.skimapis.com/access_token'); //https://www.geeksforgeeks.org/
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
$result = curl_exec($curl);
if(!$result){die("Connection Failure");}
echo $result;
curl_close($curl);
?>
****Browser view**** 415 Unsupported Media Type The server does not support the media type transmitted in the request. How to solve this issue