PHP code example of piotrpress / remoter
1. Go to this page and download the library: Download piotrpress/remoter 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/ */
piotrpress / remoter example snippets
use PiotrPress\Remoter\Request;
use PiotrPress\Remoter\Url;
use PiotrPress\Remoter\Header;
echo ( ( new Request(
( new Url(
'https://api.github.com'
) )->setPath( '/repos/PiotrPress/remoter' ),
'GET',
( new Header(
[ 'User-Agent' => 'PiotrPress/Remoter' ],
true
) )->set( 'Accept', 'application/vnd.github.v3+json' )
) )->send() )->getHeader()->get( 'code' );