PHP code example of nickcheek / handwriting

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

    

nickcheek / handwriting example snippets

 php
use Nickcheek\Handwriting\Writer;

$handwriting = new Writer($key, $secret);

//get random font
$random = $handwriting->getAllHandwriting(['limit'=> 50,'offset'=>1,'order_dir'=>'asc','order_by'=>'title']);

//build the url
$build = $handwriting->text('Testing the handwriting.io library')
                    ->font($random[array_rand($random)]->id)
                    ->build();

echo $handwriting->renderPNGImage($build);