PHP code example of willwashburn / phpamo
1. Go to this page and download the library: Download willwashburn/phpamo 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/ */
willwashburn / phpamo example snippets
$phpamo = new \WillWashburn\Phpamo\Phpamo(
'YOUR_CAMO_KEY',
'YOUR_CAMO_DOMAIN'
);
// returns a url guaranteed to be https
$phpamo->camo($url);
// returns a https url only when http url is used
// otherwise returns the url
$phpamo->camoHttpOnly($url);
$phpamo = new \WillWashburn\Phpamo\Phpamo(
'YOUR_CAMO_KEY',
'YOUR_CAMO_DOMAIN',
new QueryStringFormatter(new QueryStringEncoder)
);
// returns a https url in the query string format
$phpamo->camo($url);