From: indresh singh bhadoria Date: Tue, 30 May 2017 17:48:55 +0530 Subject: folder navigation --- folder navigation --- Binary files 'a/Downloads/pic1.jpg' and b/Downloads/pic1.jpg differ --- 'a/browse.php' +++ b/browse.php @@ -10,7 +10,6 @@ $client_secret = 'Pax7Rmv9uWo2KrNcXMtlDt $hk = hash_hmac('sha256', $fileContent, $client_secret, true); $hmac = base64_encode($hk); $ur = array('Content-Type: '.$mime, 'Authorization: Bearer ' . $access_token, 'path : '.$filePath, 'hmac : ' . $hmac . ''); -//$fileContent = file_get_contents($filePath); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://developers.digitallocker.gov.in/public/oauth2/1/file/upload"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); --- /dev/null +++ b/doc - Copy.php @@ -0,0 +1,253 @@ + $code, + 'grant_type' => 'authorization_code', + 'client_id' => 'NIELN3M9', + 'client_secret' => 'DQ3pWgCtB0I3EhSrtTXU', + 'redirect_uri' => 'http://localhost/digibank/doc.php', +); +$vh = curl_init($url); +curl_setopt($vh, CURLOPT_CUSTOMREQUEST, "POST"); +curl_setopt($vh, CURLOPT_POST, true); +curl_setopt($vh, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds +curl_setopt($vh, CURLOPT_POSTFIELDS, $post); +//curl_setopt($vh, CURLOPT_HTTPHEADER, $headers); +curl_setopt($vh, CURLOPT_SSL_VERIFYPEER, 0); +curl_setopt($vh, CURLOPT_SSL_VERIFYHOST, 0); +curl_setopt($vh, CURLOPT_RETURNTRANSFER, true); +$result = curl_exec($vh); +curl_close($vh); +$notgettingdata = explode('¿', $result); +$getToken = json_decode($notgettingdata[1]); +$access_token = $getToken->access_token; + + + + +$headers = array( + 'Authorization: Bearer ' . $access_token + //'Authorization: Basic '. base64_encode("$username:$password") +); +$urlFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/'; +$vhf = curl_init($urlFile); +curl_setopt($vhf, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds +curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers); +curl_setopt($vhf, CURLOPT_SSL_VERIFYPEER, 0); +curl_setopt($vhf, CURLOPT_SSL_VERIFYHOST, 0); +curl_setopt($vhf, CURLOPT_RETURNTRANSFER, true); +$resFile = curl_exec($vhf); +curl_close($vhf); +$resFileNew = explode('¿', $resFile); +$dataF = json_decode($resFileNew[1], TRUE); + + +$headers = array( + 'Authorization: Bearer ' . $access_token + //'Authorization: Basic '. base64_encode("$username:$password") +); +$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued'; +$vhi = curl_init($urlissued); +curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds +curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers); +curl_setopt($vhi, CURLOPT_SSL_VERIFYPEER, 0); +curl_setopt($vhi, CURLOPT_SSL_VERIFYHOST, 0); +curl_setopt($vhi, CURLOPT_RETURNTRANSFER, true); +$resissued = curl_exec($vhi); +$resissuedErr = curl_error($vhi); +curl_close($vhi); +$issuedNew = explode('¿', $resissued); +$dataI = json_decode($issuedNew[1], TRUE); +?> + +
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + +
HOME
+
+ + + &uri=&id="> + * * */ ?> + + + + + + + + + + + +
NameSizeDateAction
+ "; + echo($api_detail['name']); + } elseif ($api_detail['type'] == "file") { + echo " "; + echo($api_detail['name']); + } + ?> + + +
+ +
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + +
NameSizeDate
+ "; + echo($issued_detail['name']); + ?> + + + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ + + + \ No newline at end of file --- 'a/doc.php' +++ b/doc.php @@ -26,7 +26,6 @@ $getToken = json_decode($notgettingdata[ $access_token = $getToken->access_token; - $headers = array( 'Authorization: Bearer ' . $access_token //'Authorization: Basic '. base64_encode("$username:$password") @@ -82,73 +81,59 @@ $dataI = json_decode($issuedNew[1], TRUE
- - + -
close
- - - &uri=&id="> - * * */ ?> - + -
-
Name Size Date Action
- "; - echo($api_detail['name']); - } elseif ($api_detail['type'] == "file") { - echo " "; - echo($api_detail['name']); - } - ?> +
HOME
+
- - - - - - - -
-
-
- - - - - - - - - - + + + &uri=&id="> + * * */ ?> + '; + echo " "; + echo($api_detail['name']); + } elseif ($api_detail['type'] == "file") { + echo ""; + echo " "; + echo($api_detail['name']); + } + echo ""; + ?> + + + + + + + + - - @@ -156,7 +141,7 @@ $dataI = json_decode($issuedNew[1], TRUE -
+
@@ -168,16 +153,15 @@ $dataI = json_decode($issuedNew[1], TRUE Name Size Date - - - - "; - echo($issued_detail['name']); + + + "; + echo($issued_detail['name']); + ?> @@ -185,11 +169,11 @@ foreach ($dataI['items'] as $issued_deta - + - +
- --- 'a/download.php' +++ b/download.php @@ -4,7 +4,6 @@ $headers = array( 'Authorization: Bearer ' . $_GET['accessToken'] //'Authorization: Basic '. base64_encode("$username:$password") ); - $uriFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/file/' . $_GET['uri']; $uri = curl_init($uriFile); curl_setopt($uri, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds @@ -18,5 +17,4 @@ $file = file_put_contents("Downloads/" . //return file_get_contents("http://".$_SERVER['HTTP_HOST']."/digibank/Downloads/".$_GET['fileName']); echo "Your File hase been downloaded please Click Here to view your document"; - ?> \ No newline at end of file --- 'a/payment.php' +++ b/payment.php @@ -1,6 +1,5 @@
-
@@ -8,9 +7,7 @@

Payment

-
-
@@ -64,36 +61,11 @@
- - - - - - - - -
-
- - - -
- \ No newline at end of file --- 'a/upload.php' +++ b/upload.php @@ -43,7 +43,6 @@
- --- 'a/uploaddoc.php' +++ b/uploaddoc.php @@ -26,7 +26,6 @@ $getToken = json_decode($notgettingdata[ $access_token = $getToken->access_token; - $headers = array( 'Authorization: Bearer ' . $access_token //'Authorization: Basic '. base64_encode("$username:$password") @@ -80,7 +79,6 @@ $dataF = json_decode($resFileNew[1], TRU
-