authpartner
Clone or download
Modified Files
<?php
<?php
$code = $_GET['code'];
$code = $_GET['code'];
$state = $_GET['state'];
$state = $_GET['state'];
$headers = array(
$headers = array(
'Content-Type:application/json'
'Content-Type:application/json'
);
);
$url = "https://developers.digitallocker.gov.in/public/oauth2/1/token";
$url = "https://developers.digitallocker.gov.in/public/oauth2/1/token";
$post = array(
$post = array(
'code' => $code,
'code' => $code,
'grant_type' => 'authorization_code',
'grant_type' => 'authorization_code',
'client_id' => 'NIELN3M9',
'client_id' => 'NIELN3M9',
'client_secret' => 'DQ3pWgCtB0I3EhSrtTXU',
'client_secret' => 'DQ3pWgCtB0I3EhSrtTXU',
'redirect_uri' => 'http://localhost/digibank/response.php',
'redirect_uri' => 'http://localhost/digibank/response.php',
);
);
$vh = curl_init($url);
$vh = curl_init($url);
curl_setopt($vh, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($vh, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($vh, CURLOPT_POST, true);
curl_setopt($vh, CURLOPT_POST, true);
curl_setopt($vh, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vh, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vh, CURLOPT_POSTFIELDS, $post);
curl_setopt($vh, CURLOPT_POSTFIELDS, $post);
//curl_setopt($vh, CURLOPT_HTTPHEADER, $headers);
//curl_setopt($vh, CURLOPT_HTTPHEADER, $headers);
curl_setopt($vh, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vh, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vh, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vh, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vh, CURLOPT_RETURNTRANSFER, true);
curl_setopt($vh, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($vh);
$result = curl_exec($vh);
curl_close($vh);
curl_close($vh);
$notgettingdata = explode('¿', $result);
$notgettingdata = explode('¿', $result);
$getToken = json_decode($notgettingdata[1]);
$getToken = json_decode($notgettingdata[1]);
$access_token = $getToken->access_token;
$access_token = $getToken->access_token;
$headers = array(
$headers = array(
'Authorization: Bearer ' . $access_token
'Authorization: Bearer ' . $access_token
//'Authorization: Basic '. base64_encode("$username:$password")
//'Authorization: Basic '. base64_encode("$username:$password")
);
);
$urlFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/';
$urlFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/';
$vhf = curl_init($urlFile);
$vhf = curl_init($urlFile);
//curl_setopt($vhf, CURLOPT_CUSTOMREQUEST, "POST");
//curl_setopt($vhf, CURLOPT_CUSTOMREQUEST, "POST");
//curl_setopt($vhf, CURLOPT_POST, true);
//curl_setopt($vhf, CURLOPT_POST, true);
curl_setopt($vhf, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vhf, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers);
curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers);
//curl_setopt($vhf, CURLOPT_POSTFIELDS, $post);
//curl_setopt($vhf, CURLOPT_POSTFIELDS, $post);
//curl_setopt($vhf, CURLOPT_FOLLOWLOCATION, true);
//curl_setopt($vhf, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($vhf, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vhf, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vhf, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vhf, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vhf, CURLOPT_RETURNTRANSFER, true);
curl_setopt($vhf, CURLOPT_RETURNTRANSFER, true);
$resFile = curl_exec($vhf);
$resFile = curl_exec($vhf);
curl_close($vhf);
curl_close($vhf);
$resFileNew = explode('¿', $resFile);
$resFileNew = explode('¿', $resFile);
$dataF = json_decode($resFileNew[1], TRUE);
$dataF = json_decode($resFileNew[1], TRUE);
$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued';
$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued';
$vhi = curl_init($urlissued);
$vhi = curl_init($urlissued);
//curl_setopt($vhi, CURLOPT_CUSTOMREQUEST, "GET");
//curl_setopt($vhi, CURLOPT_CUSTOMREQUEST, "GET");
//curl_setopt($vhi, CURLOPT_POST, true);
//curl_setopt($vhi, CURLOPT_POST, true);
curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers);
curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers);
//curl_setopt($vhi, CURLOPT_POSTFIELDS, $post);
//curl_setopt($vhi, CURLOPT_POSTFIELDS, $post);
//curl_setopt($vhi, CURLOPT_FOLLOWLOCATION, true);
//curl_setopt($vhi, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($vhi, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vhi, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vhi, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vhi, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vhi, CURLOPT_RETURNTRANSFER, true);
curl_setopt($vhi, CURLOPT_RETURNTRANSFER, true);
$resissued = curl_exec($vhi);
$resissued = curl_exec($vhi);
$resissuedErr = curl_error($vhi);
$resissuedErr = curl_error($vhi);
curl_close($vhi);
curl_close($vhi);
$issuedNew = explode('¿', $resissued);
$issuedNew = explode('¿', $resissued);
$dataI = json_decode($issuedNew[1], TRUE);
$dataI = json_decode($issuedNew[1], TRUE);
?>
?>
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<html lang="en">
<head>
<head>
<meta charset="utf-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="description" content="">
<meta name="author" content="">
<meta name="author" content="">
<title>DigiBank</title>
<title>DigiBank</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- Bootstrap Core CSS -->
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<!-- Custom CSS -->
<link href="css/digi-bank.css" rel="stylesheet">
<link href="css/digi-bank.css" rel="stylesheet">
<!-- Custom Fonts -->
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</head>
</head>
<body>
<body>
<div id="wrapper">
<div id="wrapper">
<!-- Navigation -->
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</button>
<a class="navbar-brand" href="index.html">DigiBank</a>
<a class="navbar-brand" href="index.html">DigiBank</a>
</div>
</div>
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav side-nav">
<ul class="nav navbar-nav side-nav">
<li class="active">
<li class="active">
<a href="index.php"><i class="fa fa-fw fa-clock-o"></i> Link To DigiLocker</a>
<a href="index.php"><i class="fa fa-fw fa-clock-o"></i> Link To DigiLocker</a>
</li>
</li>
<li>
<li>
<a href="link_document.php"><i class="fa fa-fw fa-link"></i> Loan Approvals</a>
<a href="link_document.php"><i class="fa fa-fw fa-link"></i> Loan Approvals</a>
</li>
</li>
<li>
<li>
<a href="statement.php"><i class="fa fa-fw fa-stack-exchange"></i>Account Statements</a>
<a href="statement.php"><i class="fa fa-fw fa-stack-exchange"></i>Account Statements</a>
</li>
</li>
</ul>
</ul>
</div>
</div>
<!-- /.navbar-collapse -->
<!-- /.navbar-collapse -->
</nav>
</nav>
<div id="page-wrapper">
<div id="page-wrapper">
<div class="container-fluid">
<div class="container-fluid">
<!-- Page Heading -->
<!-- Page Heading -->
<div class="row">
<div class="row">
<div class="col-lg-12">
<div class="col-lg-12">
<div class="container">
<div class="container">
<ul class="nav nav-tabs">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#uploadeddocument">Uploaded Document</a></li>
<li class="active"><a data-toggle="tab" href="#uploadeddocument">Uploaded Document</a></li>
<li><a data-toggle="tab" href="#issueddocument">Issued Document</a></li>
<li><a data-toggle="tab" href="#issueddocument">Issued Document</a></li>
<li><a data-toggle="tab" href="#menu2">Menu 2</a></li>
<li><a data-toggle="tab" href="#menu2">Menu 2</a></li>
</ul>
</ul>
<div class="tab-content">
<div class="tab-content">
<div id="uploadeddocument" class="tab-pane fade in active">
<div id="uploadeddocument" class="tab-pane fade in active">
<section class="content">
<section class="content">
<div class="row">
<div class="row">
<div class="col-md-12">
<div class="col-md-12">
<div class="box box-primary">
<div class="box box-primary">
<div class="box box-body col-sm-12">
<div class="box box-body col-sm-12">
<div class="table-responsive">
<div class="table-responsive">
<table class="table">
<table class="table">
<tr>
<tr>
<th>Name</th>
<th>Name</th>
<th>Type</th>
<th>Type</th>
<th>Size</th>
<th>Size</th>
<th>Date</th>
<th>Date</th>
<th>Parent</th>
<th>Parent</th>
<th>Mime</th>
<th>Mime</th>
<th>Uri</th>
<th>Uri</th>
<th>Description</th>
<th>Description</th>
<th>Issuer</th>
<th>Issuer</th>
</tr>
</tr>
<?php
<?php
foreach ($dataF['items'] as $api_detail):
foreach ($dataF['items'] as $api_detail):
?>
?>
<tr>
<tr>
<td><a href="/digibank/uri.php?access_tocken=<?php echo $access_token; ?>&uri=<?php echo($api_detail['uri']); ?>&name=<?php echo($api_detail['name']); ?>">
<td><a href="/digibank/uri.php?access_tocken=<?php echo $access_token; ?>&uri=<?php echo($api_detail['uri']); ?>&name=<?php echo($api_detail['name']); ?>">
<?php
<?php
if ($api_detail['type'] == "dir") {
if ($api_detail['type'] == "dir") {
echo "<i class='fa fa-folder-o'></i> ";
echo "<i class='fa fa-folder-o'></i> ";
} elseif ($api_detail['type'] == "file") {
} elseif ($api_detail['type'] == "file") {
echo "<i class='fa fa-file-o'></i> ";
echo "<i class='fa fa-file-o'></i> ";
} echo($api_detail['name']);
} echo($api_detail['name']);
?></a></td>
?></a></td>
<td><?php echo($api_detail['type']); ?>></td>
<td><?php echo($api_detail['size']); ?></td>
<td><?php echo($api_detail['size']); ?></td>
<td><?php echo($api_detail['date']); ?></td>
<td><?php echo($api_detail['date']); ?></td>
<td><?php echo($api_detail['parent']); ?></td>
<td><?php echo($api_detail['parent']); ?></td>
<td><?php echo($api_detail['mime']); ?></td>
<td><?php echo($api_detail['mime']); ?></td>
<td><?php echo($api_detail['uri']); ?></td>
<td><?php echo($api_detail['uri']); ?></td>
<td><?php echo($api_detail['description']); ?></td>
<td><?php echo($api_detail['description']); ?></td>
<td><?php echo($api_detail['issuer']); ?></td>
<td><?php echo($api_detail['issuer']); ?></td>
</tr>
</tr>
<?php
<?php
endforeach;
endforeach;
?>
?>
</table>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
<div id="issueddocument" class="tab-pane fade">
<div id="issueddocument" class="tab-pane fade">
<section class="content">
<section class="content">
<div class="row">
<div class="row">
<div class="col-md-12">
<div class="col-md-12">
<div class="box box-primary">
<div class="box box-primary">
<div class="box box-body col-sm-12">
<div class="box box-body col-sm-12">
<div class="table-responsive">
<div class="table-responsive">
<table class="table">
<table class="table">
<tr>
<tr>
<th>Name</th>
<th>Name</th>
<th>Type</th>
<th>Type</th>
<th>Size</th>
<th>Size</th>
<th>Date</th>
<th>Date</th>
<th>Parent</th>
<th>Parent</th>
<th>Mime</th>
<th>Mime</th>
<th>Uri</th>
<th>Uri</th>
<th>Description</th>
<th>Description</th>
<th>Issuer</th>
<th>Issuer</th>
</tr>
</tr>
<?php
<?php
foreach ($dataI['items'] as $issued_detail):
foreach ($dataI['items'] as $issued_detail):
?>
?>
<tr><td>
<tr><td>
<?php
<?php
if ($issued_detail['type'] == "dir") {
if ($issued_detail['type'] == "dir") {
echo "<i class='fa fa-folder-o'></i> ";
echo "<i class='fa fa-folder-o'></i> ";
} elseif ($issued_detail['type'] == "file") {
} elseif ($issued_detail['type'] == "file") {
echo "<i class='fa fa-file-o'></i> ";
echo "<i class='fa fa-file-o'></i> ";
} echo($issued_detail['name']);
} echo($issued_detail['name']);
?>
?>
</td>
</td>
<td><?php echo($issued_detail['type']); ?>></td>
<td><?php echo($issued_detail['type']); ?>></td>
<td><?php echo($issued_detail['size']); ?></td>
<td><?php echo($issued_detail['size']); ?></td>
<td><?php echo($issued_detail['date']); ?></td>
<td><?php echo($issued_detail['date']); ?></td>
<td><?php echo($issued_detail['parent']); ?></td>
<td><?php echo($issued_detail['parent']); ?></td>
<td><?php echo($issued_detail['mime']); ?></td>
<td><?php echo($issued_detail['mime']); ?></td>
<td><?php echo($issued_detail['uri']); ?></td>
<td><?php echo($issued_detail['uri']); ?></td>
<td><?php echo($issued_detail['description']); ?></td>
<td><?php echo($issued_detail['description']); ?></td>
<td><?php echo($issued_detail['issuer']); ?></td>
<td><?php echo($issued_detail['issuer']); ?></td>
</tr>
</tr>
<?php
<?php
endforeach;
endforeach;
?>
?>
</table>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
<div id="menu2" class="tab-pane fade">
<div id="menu2" class="tab-pane fade">
<h3>Menu 2</h3>
<h3>Menu 2</h3>
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.</p>
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
<!-- /.container-fluid -->
</div>
</div>
</div>
</div>
<!-- jQuery -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</body>
</html>
</html>