PHP code example of boeki / universal-connector
1. Go to this page and download the library: Download boeki/universal-connector library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
boeki / universal-connector example snippets
# Magento
$api = APIProvider::Magento2Instance();
# SendinBlue
$api = APIProvider::SendinBlueInstance();
# Magento
$api->initialize("username", "password", "http://example.com");
# SendinBlue
$api->initialize("xkeysib-5bbxxxxxxxxxxxxxxxx");
# Magento
$api->setWebsite($website_id);
# SendinBlue
use UniversalConnector\API\APIProvider;
use UniversalConnector\API\SendinBlue\Builder\SendinBlueTools;
$api = APIProvider::SendinBleuInstance();
$api->initialize("xkeysib-5bbxxxxxxxxxxxxxxxx");
$fileBody = SendinBlueTools::CONTACTS_FILE_BODY(
["EMAIL","NOM","PRENOM","SMS"],
[
["[email protected] ","Standbridge","James","972542116060"],
["[email protected] ","Lucas","Vanessa","972542116061"],
["[email protected] ","Arnold","Arthur","972542116063"]
]
);
$response = $api->POST_contacts(
$fileBody,
null,
["listName" => "Universal-connector_list_test", "folderId" => 9],
true,
false,
null,
false,
false
);