Skip to content

Instantly share code, notes, and snippets.

@jacek-9999
Created February 15, 2016 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacek-9999/64c319344ab8d9e50ea2 to your computer and use it in GitHub Desktop.
Save jacek-9999/64c319344ab8d9e50ea2 to your computer and use it in GitHub Desktop.
<?php
/*
* with this index you can set bins in url like that:
* http://localhost/14124
*/
require __DIR__ . '/vendor/autoload.php';
$rq = $_SERVER['REQUEST_URI'];
$arr = explode('/', $rq);
$arr = array_reverse($arr);
$num = (int)$arr[0];
$creditCardGenerator = new jacek9999\creditCardGenerator();
$creditCardGenerator->setBin($num);
$cc = $creditCardGenerator->getCC();
header('Content-Type: application/json; charset=utf-8');
echo json_encode($cc);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment