website/api/random_repo.php

7 lines
174 B
PHP
Raw Normal View History

2023-12-31 11:05:29 +00:00
<?php
$repos = json_decode(file_get_contents("https://git.reim.ar/api/v1/repos/search"))->data;
$repo = $repos[array_rand($repos)];
header("Location: $repo->html_url");