PHP code example of logpusher / logpusher-php

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

    

logpusher / logpusher-php example snippets


$pusher = new \LogPusher\LogPusherClient(
    new \GuzzleHttp\Client([]),
    '[email protected]',
    'PASSWORD',
    'API_KEY'
);

$pusher->push(
    'My awesome log message', 
    'myawesomesite.com', 
    'E-commerce', 
    'Notice', 
    date('H:i'), 
    new \DateTime('now'), 
    '1'
);

composer