diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..0973a16 --- /dev/null +++ b/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "endroid/qrcode": "^1.9" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..5a874e6 --- /dev/null +++ b/composer.lock @@ -0,0 +1,133 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "fea912101c2320fcdc7bc2478a2b0001", + "content-hash": "b1c8205e21c87a18c2ab35fc5b8f5f6c", + "packages": [ + { + "name": "endroid/qrcode", + "version": "1.9.1", + "source": { + "type": "git", + "url": "https://github.com/endroid/QrCode.git", + "reference": "ab09b42778ad67cfe850f9c23165f8d08b756680" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/QrCode/zipball/ab09b42778ad67cfe850f9c23165f8d08b756680", + "reference": "ab09b42778ad67cfe850f9c23165f8d08b756680", + "shasum": "" + }, + "require": { + "ext-gd": "*", + "php": ">=5.4", + "symfony/options-resolver": "^2.3|^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0", + "sensio/framework-extra-bundle": "^3.0", + "symfony/browser-kit": "^2.3|^3.0", + "symfony/framework-bundle": "^2.3|^3.0", + "symfony/http-kernel": "^2.3|^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Endroid\\QrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl", + "homepage": "http://endroid.nl/" + } + ], + "description": "Endroid QR Code", + "homepage": "https://github.com/endroid/QrCode", + "keywords": [ + "bundle", + "code", + "endroid", + "qr", + "qrcode", + "symfony" + ], + "time": "2017-01-03 11:02:14" + }, + { + "name": "symfony/options-resolver", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "855429e3e9014b9dafee2a667de304c3aaa86fe6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/855429e3e9014b9dafee2a667de304c3aaa86fe6", + "reference": "855429e3e9014b9dafee2a667de304c3aaa86fe6", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "time": "2017-01-02 20:32:22" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/index.php b/index.php index a42a84e..1f464a1 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,9 @@ '.$shortUrl.''; + $qrcode = (new QrCode())->setText($shortUrl); + + $content = ''.$shortUrl.'' + .''; } elseif (!empty($_GET)) { $urlhash = key($_GET);