PHP code example of dominikveils / goo-gl

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

    

dominikveils / goo-gl example snippets




l = new DominikVeils\Googl\Googl('API KEY');

$short_url =  $googl->shorten('http://google.com');
echo "SHORT URL: {$short_url}", PHP_EOL;
$long_url = $googl->expand($short_url);
echo "LONG URL: {$long_url}", PHP_EOL;