aboutsummaryrefslogtreecommitdiffstats
path: root/.github/FILE_LINK.php
blob: 34fb4ad3bf7f60b602cb9b3ae80d7405b60d73b4 (plain)
1
2
3
4
5
6
7
8
9
10
<?php
$json = file_get_contents('https://api.github.com/repos/kriztan/Pix-Art-Messenger/releases/latest');
$data = json_decode($json);
$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);
?>