-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.php
42 lines (29 loc) · 839 Bytes
/
test.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
<?php
include "ItellaEmmi.php";
$service_id = 'my_service_id';
$username = 'my_username';
$password = 'my_password';
$service_uri = 'http://mediabank.example.com/emmisoap.asmx';
try {
$emmi = new ItellaEmmi($service_id, $username, $password, $service_uri);
} catch (Exception $e) {
print("Couldn't connect to $service_uri with the given crenditals.\n");
exit();
}
$criterias = array(
new ItellaEmmiSearchCriteriaModifiedAfter(time() - (60 * 60 * 24 * 7)),
);
/*
Notice that you can also add multiple criteria like this:
$criterias = array(
new ItellaEmmiSearchCriteriaModifiedAfter(time() - (60 * 60 * 24 * 14)),
new ItellaEmmiSearchCriteriaModifiedBefore(time() - (60 * 60 * 24 * 7)),
);
*/
$files = $emmi->searchFiles($criterias);
if ($files) {
print_r($files);
}
else {
print("No files found.\n");
}