1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,21 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+require_once('phaxio_config.php'); |
|
4 |
+require_once('autoload.php'); |
|
5 |
+ |
|
6 |
+$phaxio = new Phaxio($apiKeys[$apiMode], $apiSecrets[$apiMode], $apiHost); |
|
7 |
+ |
|
8 |
+$params = array( |
|
9 |
+ 'metadata' => "This example metadata will be associated with any fax received with the PhaxCode generated below." |
|
10 |
+); |
|
11 |
+ |
|
12 |
+$phax_code = $phaxio->phaxCodes()->create($params); |
|
13 |
+$phax_code->retrieve(); # Downloads the image |
|
14 |
+ |
|
15 |
+$filename = "PhaxCode-$phax_code[identifier].png"; |
|
16 |
+ |
|
17 |
+file_put_contents($filename, $phax_code->body); |
|
18 |
+ |
|
19 |
+echo "Saved barcode to $filename\n"; |
|
20 |
+ |
|
21 |
+ |