@@ -33,7 +33,7 @@ require_once("vendor/autoload.php");
33
33
Download the ` Omnisend.php ` file and include it manually:
34
34
35
35
``` php
36
- require_once('Omnisend.php');
36
+ require_once('Omnisend.php');
37
37
```
38
38
** Note:** check and correct if needed "Omnisend.php" path.
39
39
@@ -43,7 +43,8 @@ Available methods & options
43
43
``` php
44
44
$options = array(
45
45
'timeout' => 30,
46
- 'verifySSL' => false
46
+ 'verifySSL' => false,
47
+ 'curlOptions' => array()
47
48
);
48
49
$omnisend = new Omnisend('API-KEY', $options);
49
50
```
@@ -54,6 +55,7 @@ Available options:
54
55
| ---| ---| ---|
55
56
|timeout|int|Timeout. If not passed - will be calculated depending on PHP max_execution_time
56
57
|verifySSL|bool|Default - true. Enable (true) or disable (false) SSL verification.
58
+ |curlOptions|array|array of CURLOPT_ * of options passed to ` curl_setopt_array() `
57
59
58
60
** Available methods**
59
61
@@ -131,10 +133,10 @@ $omnisend = new Omnisend('your-api-key');
131
133
$contacts = $omnisend->post(
132
134
'contacts',
133
135
array(
134
-
135
- "firstName" => "Vanessa",
136
- "lastName" => "Kensington",
137
- "status" => "subscribed",
136
+
137
+ "firstName" => "Vanessa",
138
+ "lastName" => "Kensington",
139
+ "status" => "subscribed",
138
140
"statusDate" => "2018-12-11T10:29:43+00:00"
139
141
)
140
142
);
@@ -146,7 +148,7 @@ if ($contacts) {
146
148
//request was successful
147
149
148
150
//print response
149
- print_r($contacts);
151
+ print_r($contacts);
150
152
//get contactID from response
151
153
$contactID = $contacts['contactID'];
152
154
} else {
0 commit comments