0

How to output link request only without download it? i already use htmlentities it keep download it don't want output the link directly without download.

Secret Json file

http://s000.tinyupload.com/index.php?file_id=86058541986944274128

and this this api fileId https://developers.google.com/drive/v3/reference/files/get i test in try live it display any information in json. but how to apply into php. or theres another ways.

<?php

require_once('vendor/autoload.php');

putenv('GOOGLE_APPLICATION_CREDENTIALS=test.json');
$client = new Google_Client();
$client->addScope(Google_Service_Drive::DRIVE);
$client->useApplicationDefaultCredentials();

$service = new Google_Service_Drive($client);

$fileId = "1wn9lQWIipzLYqyuJMzwwUTh3XUSpuokP";

$content = $service->files->get($fileId, array("alt" => "media"));
header("Content-Disposition: attachment; filename=test.png"); 
header('Content-Type: image/png');

echo htmlentites($content->getBody()->getContents());

?>
tehhowch
  • 9,645
  • 4
  • 24
  • 42
daivd rush
  • 87
  • 6

0 Answers0