<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">&lt;?php
$org = 'pear';

require 'HTTP2.php';
$url = 'https://api.github.com/orgs/' . $org . '/repos';

$cloneUrls = array();
do {
    $json = json_decode(file_get_contents($url));
    $url = null;
    foreach ($json as $repo) {
        $cloneUrls[] = $repo-&gt;clone_url;
    }
    if (isset($http_response_header)) {
        foreach ($http_response_header as $line) {
            if (substr(strtolower($line), 0, 5) == 'link:') {
                $links = HTTP2::parseLinks(substr($line, 5));
                foreach ($links as $link) {
                    if (array_search('next', $link['rel']) !== false) {
                        $url = $link['_uri'];
                    }
                }
            }
        }
    }
} while ($url != null);

foreach ($cloneUrls as $cloneUrl) {
    echo $cloneUrl . "\n";
}
?&gt;
</pre></body></html>