PHP code example of liujinyong / simple-tools

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

    

liujinyong / simple-tools example snippets



    $data = \Liujinyong\SimpleTools\Tools::httpClient("get","www.baidu.com");
    echo $data;
    
    $data = array(
        array( 'clicks' => 1, 'clickDate' =>'2015-10-11' ),
        array( 'clicks' => 2, 'clickDate' =>'2015-10-11' ),
        array( 'clicks' => 3, 'clickDate' =>'2015-10-09' ),
        array( 'clicks' => 4, 'clickDate' =>'2015-10-08' ),
    );
    $data = \Liujinyong\SimpleTools\Tools::page($data,3,2);
    print_r( $data);


     $data = \Liujinyong\SimpleTools\Tools::getAge("1999-02-01");
     echo $data;