PHP code example of onoi / remi

1. Go to this page and download the library: Download onoi/remi 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/ */

    

onoi / remi example snippets


use Onoi\HttpRequest\HttpRequestFactory;
use Onoi\Remi\FilteredHttpResponseParserFactory;

$httpRequestFactory = new HttpRequestFactory()

$filteredHttpResponseParserFactory = new FilteredHttpResponseParserFactory(
	$httpRequestFactory->newCurlRequest()
);

$crossRefFilteredHttpResponseParser = $filteredHttpResponseParserFactory->newCrossRefFilteredHttpResponseParser(
	new FilteredRecord()
)

$crossRefFilteredHttpResponseParser->doFilterResponseById( '10.1126/science.1152662' );

$filteredRecord = new FilteredRecord();
$filteredRecord->setRedactedFields( array( 'pages', 'abstract' ) );

$pubMedFilteredHttpResponseParser = $filteredHttpResponseParserFactory->newNcbiPubMedFilteredHttpResponseParser(
	$filteredRecord
)

$pubMedFilteredHttpResponseParser->doFilterResponseById( '19782018' );