PHP code example of vipsoft / mysql-login

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

    

vipsoft / mysql-login example snippets


    use VIPSoft\MySQLLogin;

    $reader = new MySQLLogin(get_env('HOME') . '/.mylogin.cnf');

    // get decoded credentials
    $credentials = $reader->get('client');

    $host = $credentials['host'];
    $user = $credentials['user'];
    $password = $credentials['password'];