PHP code example of awheel / md52url
1. Go to this page and download the library: Download awheel/md52url 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/ */
awheel / md52url example snippets
use awheel\md52url;
$md2url = new md52url([
'http://img1.example.com',
'http://img2.example.com',
'http://img3.example.com',
'http://img4.example.com',
]);
$md5 = $md2url->md5(__DIR__.'/test.png');
echo $md5.PHP_EOL;
$path = $md2url->path($md5);
echo $path.PHP_EOL;
$url = $md2url->url($md5);
echo $url.PHP_EOL;