-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsyncProducts.php
More file actions
38 lines (26 loc) · 842 Bytes
/
syncProducts.php
File metadata and controls
38 lines (26 loc) · 842 Bytes
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
<?php
/*
* Replace with your pimcore url
*/
$baseUrl = "http://pimcore-6.local:9090";
$url = $baseUrl.'/sintra_pimcore/sync_objects?class=Product';
$options = getopt(null, ["server:","limit:","execTime:","maxSyncTime:","typicalSyncTime:"]);
if(array_key_exists("server", $options)){
$url .= "&server=".$options["server"];
}
if(array_key_exists("limit", $options)){
$url .= "&limit=".$options["limit"];
}
if(array_key_exists("execTime", $options)){
$url .= "&execTime=".$options["execTime"];
}
if(array_key_exists("maxSyncTime", $options)){
$url .= "&maxSyncTime=".$options["maxSyncTime"];
}
if(array_key_exists("typicalSyncTime", $options)){
$url .= "&typicalSyncTime=".$options["typicalSyncTime"];
}
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
$result = curl_exec($curl);
curl_close($curl);