Include composer dependencies in repo

This commit is contained in:
Frederic Guillot
2017-10-25 16:22:10 -07:00
parent c507c54162
commit 9e2b2a32fd
1787 changed files with 123616 additions and 45 deletions

14
vendor/gregwar/captcha/demo/demo.php vendored Normal file
View File

@@ -0,0 +1,14 @@
<?php
include(__DIR__.'/../CaptchaBuilderInterface.php');
include(__DIR__.'/../PhraseBuilderInterface.php');
include(__DIR__.'/../CaptchaBuilder.php');
include(__DIR__.'/../PhraseBuilder.php');
use Gregwar\Captcha\CaptchaBuilder;
$captcha = new CaptchaBuilder;
$captcha
->build()
->save('out.jpg')
;

View File

@@ -0,0 +1,15 @@
<?php
include(__DIR__.'/../CaptchaBuilderInterface.php');
include(__DIR__.'/../PhraseBuilderInterface.php');
include(__DIR__.'/../CaptchaBuilder.php');
include(__DIR__.'/../PhraseBuilder.php');
use Gregwar\Captcha\CaptchaBuilder;
echo count(CaptchaBuilder::create()
->build()
->getFingerprint()
);
echo "\n";

15
vendor/gregwar/captcha/demo/index.php vendored Normal file
View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<body>
<html>
<meta charset="utf-8" />
</html>
<body>
<h1>Captchas gallery</h1>
<?php for ($x=0; $x<8; $x++) { ?>
<?php for ($y=0; $y<5; $y++) { ?>
<img src="output.php?n=<?php echo 5*$x+$y; ?>" />
<?php } ?>
<br />
<?php } ?>
</body>
</body>

42
vendor/gregwar/captcha/demo/ocr.php vendored Normal file
View File

@@ -0,0 +1,42 @@
<?php
include(__DIR__.'/../CaptchaBuilderInterface.php');
include(__DIR__.'/../PhraseBuilderInterface.php');
include(__DIR__.'/../CaptchaBuilder.php');
include(__DIR__.'/../PhraseBuilder.php');
use Gregwar\Captcha\CaptchaBuilder;
/**
* Generates 1000 captchas and try to read their code with the
* ocrad OCR
*/
$tests = 10000;
$passed = 0;
shell_exec('rm passed*.jpg');
for ($i=0; $i<$tests; $i++) {
echo "Captcha $i/$tests... ";
$captcha = new CaptchaBuilder;
$captcha
->setDistortion(false)
->build()
;
if ($captcha->isOCRReadable()) {
$passed++;
$captcha->save("passed$passed.jpg");
echo "passed at ocr... ";
} else {
echo "failed... ";
}
echo "pass rate: ".round(100*$passed/($i+1),2)."%\n";
}
echo "\n";
echo "Over, $passed/$tests readed with OCR\n";

15
vendor/gregwar/captcha/demo/output.php vendored Normal file
View File

@@ -0,0 +1,15 @@
<?php
include(__DIR__.'/../CaptchaBuilderInterface.php');
include(__DIR__.'/../PhraseBuilderInterface.php');
include(__DIR__.'/../CaptchaBuilder.php');
include(__DIR__.'/../PhraseBuilder.php');
use Gregwar\Captcha\CaptchaBuilder;
header('Content-type: image/jpeg');
CaptchaBuilder::create()
->build()
->output()
;