Add api call to gitea for resume #2
@ -2,7 +2,7 @@
|
|||||||
<link rel="stylesheet" href="/common/header.css">
|
<link rel="stylesheet" href="/common/header.css">
|
||||||
<nav class="navbar sticky">
|
<nav class="navbar sticky">
|
||||||
<a href="/">Home</a>
|
<a href="/">Home</a>
|
||||||
<a href="/Resume.pdf">Resume</a>
|
<a href="/resume.php">Resume</a>
|
||||||
<a href="https://git.clortox.com">Git</a>
|
<a href="https://git.clortox.com">Git</a>
|
||||||
<a href="/utilities/">Utilities</a>
|
<a href="/utilities/">Utilities</a>
|
||||||
<a href="https://wiki.clortox.com">Wiki</a>
|
<a href="https://wiki.clortox.com">Wiki</a>
|
||||||
|
28
src/resume.php
Normal file
28
src/resume.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
$curl = curl_init();
|
||||||
|
curl_setopt($curl, CURLOPT_URL, "https://git.clortox.com/api/v1/repos/tyler/Resume/releases?per_page=1&access_token=96428d4ddade9a5c0892c9bceb423ce54013bf07");
|
||||||
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
|
||||||
|
$result = curl_exec($curl);
|
||||||
|
if(!$result){
|
||||||
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
$parsed = json_decode($result, true);
|
||||||
|
|
||||||
|
//var_dump($parsed[0]);
|
||||||
|
|
||||||
|
$url = $parsed[0]["assets"][0]["browser_download_url"];
|
||||||
|
if(!$url){
|
||||||
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
header('Location: ' . $url);
|
||||||
|
|
||||||
|
die();
|
||||||
|
|
||||||
|
?>
|
Reference in New Issue
Block a user