Update FILE_LINK.php
This commit is contained in:
parent
286af7e2d6
commit
967c36b5e2
1 changed files with 6 additions and 1 deletions
7
.github/FILE_LINK.php
vendored
7
.github/FILE_LINK.php
vendored
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
$json = file_get_contents('https://api.github.com/repos/kriztan/Pix-Art-Messenger/releases/latest');
|
||||
$data = json_decode($json);
|
||||
echo $data->assets[0]->browser_download_url;
|
||||
$filename = $data->assets[0]->name;
|
||||
$filesize = $data->assets[0]->size;
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'";');
|
||||
header('Content-Length: '.$filesize);
|
||||
readfile($data->assets[0]->browser_download_url);
|
||||
?>
|
||||
|
|
Reference in a new issue