Remove redirect
This commit is contained in:
parent
22063af77b
commit
2ca314bf9d
@ -10,18 +10,28 @@ if(!$result){
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
curl_close($curl);
|
||||||
$parsed = json_decode($result, true);
|
$parsed = json_decode($result, true);
|
||||||
|
|
||||||
//var_dump($parsed[0]);
|
|
||||||
|
|
||||||
$url = $parsed[0]["assets"][0]["browser_download_url"];
|
$url = $parsed[0]["assets"][0]["browser_download_url"];
|
||||||
if(!$url){
|
if(!$url){
|
||||||
header('HTTP/1.1 500 Internal Server Error');
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Location: ' . $url);
|
header('Content-Description: File Transfer');
|
||||||
|
header('Content-Type: application/pdf; charset=UTF-8');
|
||||||
|
header('Content-Disposition: inline;filename=Tyler-Perkins-Resume.pdf');
|
||||||
|
header('Expires: 0');
|
||||||
|
|
||||||
|
$result = file_get_contents($url);
|
||||||
|
|
||||||
|
if(!$result){
|
||||||
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $result;
|
||||||
die();
|
die();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user