PHP code example of metrixwire / php

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

    

metrixwire / php example snippets


$config->setSQLLogger(new \MetrixWire\Symfony\DoctrineSqlLogger());

$app->add(new \MetrixWire\Psr15\MetrixWireMiddleware());

  define('METRIXWIRE_KEY', 'mw_xxx');
  define('METRIXWIRE_ENDPOINT', 'https://metrixwire.com');
  define('SAVEQUERIES', true); // 

$pdo = new \MetrixWire\PDO($dsn, $user, $pass); // instead of new \PDO(...)
bash
composer 
ini
; php.ini
auto_prepend_file = /path/to/vendor/metrixwire/php/src/auto.php