-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathAddressStandardizationSolutionExample.php
49 lines (41 loc) · 1.19 KB
/
AddressStandardizationSolutionExample.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* Address Standardization Solution, PHP Edition,
* AddressLineStandardization() Usage Example
*
* @package AddressStandardizationSolution
* @author Daniel Convissor <[email protected]>
* @copyright The Analysis and Solutions Company, 2001-2010
* @link http://www.analysisandsolutions.com/software/addr/addr.htm
*/
/**
* Require the auto loader
*
* Use dirname(__FILE__) because "./" can be stripped by PHP's safety
* settings and __DIR__ was introduced in PHP 5.3.
*/
require dirname(__FILE__) . '/autoload.php';
$Address = new AddressStandardizationSolution;
?>
<html>
<head>
<title>Address Standardization Solution, PHP Edition,
AddressLineStandardization() Usage Example</title>
</head>
<body>
<?php
if (empty($_POST['Input'])) {
$Input = 'One Main Street Suite 89';
} else {
$Input = $_POST['Input'];
}
$Output = $Address->AddressLineStandardization($Input);
?>
<form method="post">
Input Address: <input type="text" name="Input" size="50"
value="<?php echo htmlspecialchars($Input); ?>" />
<input type="submit" name="Submit" value="Test" />
<br />USPS Standard: <samp><?php echo htmlspecialchars($Output); ?></samp>
</form>
</body>
</html>