die('Connect Error (' . $db->connect_errno . ') ' . $db->connect_error . PHP_EOL . PHP_EOL);
}
$adrConfig = parse_ini_file(__DIR__ . '/adrconfig.ini');
$CONFIG_HOST = $adrConfig['host'];
$CONFIG_ACCOUNT = $adrConfig['account'];
$CONFIG_USERID = $adrConfig['userID'];
$CONFIG_PASSWORD = $adrConfig['password'];
$CONFIG_REPORTTYPE = $adrConfig['reportType'];
$CONFIG_ADRIPADDRESS = $adrConfig['ADRIPAddress'];
$CONFIG_ADRPORT = $adrConfig['ADRPort'];
//Setup the request to be send to ADR (American Driving Records) WebMVR.
$requestOrder = new Order();
//NOTE: This is a Request\Order, NOT a Response\Order;  they are different!
//NOTE!! ADR Caveat: If the number of the year is specified in a two digit format, the values between 00-69
// are mapped to 2000-2069 and 70-99 to 1970-1999.
$dob = new Dob();
$dob->setYear(1975);
$dob->setMonth(11);
$dob->setDay(12);
$state = new State();
$state->setAbbrev('CA');
$requestOrder->setLicense('A1000004');
$requestOrder->setFirstName('CHRIS');
$requestOrder->setLastName('SMITH');
$requestOrder->setDOB($dob);
$requestOrder->setMisc('SomeRandomInternalTrackingID');
$requestOrder->setState($state);
$requestOrder->setAuxMisc('SomeOtherRandomInternalTrackingID');
$requestOrder->setAccount($CONFIG_ACCOUNT);
$requestOrder->setHandling('OL');
$requestOrder->setProductID('DL');
Esempio n. 2
0
// Next, you'll want to #! cp ./dbconfig.ini.example dbconfig.ini
// Then, edit the dbconfig.ini with your sql server credentials
// Finally, run this file
// TODO: Create indexes in the three SQL files.
$config = parse_ini_file(__DIR__ . '/dbconfig.ini');
$db = new mysqli($config['hostname'], $config['username'], $config['password'], $config['dbname']);
print PHP_EOL . PHP_EOL . "Connecting to ADR DB:" . PHP_EOL;
if ($db->connect_error) {
    die('Connect Error (' . $db->connect_errno . ') ' . $db->connect_error . PHP_EOL . PHP_EOL);
}
//Setup the request to be send to ADR (American Driving Records) WebMVR.
$requestOrder = new Order();
//NOTE: This is a Request\Order, NOT a Response\Order;  they are different!
//NOTE!! ADR Caveat: If the number of the year is specified in a two digit format, the values between 00-69
// are mapped to 2000-2069 and 70-99 to 1970-1999.
$dob = new Dob();
$dob->setYear(2000);
$dob->setMonth(01);
$dob->setDay(16);
$state = new State();
$state->setAbbrev('WI');
$requestOrder->setLicense('N50073371234-01');
$requestOrder->setFirstName('Test');
$requestOrder->setLastName('TestLastName');
$requestOrder->setDOB($dob);
$requestOrder->setMisc('SomeRandomInternalTrackingID');
$requestOrder->setState($state);
$requestOrder->setAuxMisc('SomeOtherRandomInternalTrackingID');
$requestOrder->setAccount('XXXX');
$requestOrder->setHandling('OL');
$requestOrder->setProductID('DL');