PHP code example of webcore / snitcher

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

    

webcore / snitcher example snippets


use Http\Adapter\Guzzle6\Client;
use Http\Message\MessageFactory\GuzzleMessageFactory;
use Http\Message\StreamFactory\GuzzleStreamFactory;
use Http\Message\UriFactory\GuzzleUriFactory;

$httpClient = new Client(new GuzzleHttp\Client());
$messageFactory = new GuzzleMessageFactory();
$streamFactory = new GuzzleStreamFactory();
$uriFactory = new GuzzleUriFactory();

use Webcore\Snitcher\Snitcher;
$snitcher = new Snitcher($httpClient, $messageFactory, $streamFactory, $uriFactory);

$snitcher->snitch("c2354d53d2");

$snitcher->snitch("c2354d53d2", "Finished in 23.8 seconds.")

{
    "name": "some-user/nice-project",
    "  "php-http/guzzle6-adapter": "^1.1.1",
        "php-http/message": "^1.2.0"
    }
}