PHP code example of strausmann / composerapi

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

    

strausmann / composerapi example snippets



// Instantiate ComposerAPI
$composer = new \kabachello\ComposerAPI\ComposerAPI("path_to_the_folder_with_your_composer_json");
// Run the ntents
rewind($stream);
// Print everything composer had written to the console
echo(stream_get_contents($stream));