PHP code example of tiagohillebrandt / php-parse-link-header
1. Go to this page and download the library: Download tiagohillebrandt/php-parse-link-header library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tiagohillebrandt / php-parse-link-header example snippets
$headers = [
'Link' => '<https://api.github.com/organizations/xyz/repos?page=2>; rel="next", <https://api.github.com/organizations/xyz/repos?page=4>; rel="last"',
];
$links = ( new TiagoHillebrandt\ParseLinkHeader( $headers['Link'] ) )->toArray();
print_r( $links );