| Server IP : 23.111.136.34 / Your IP : 216.73.216.136 Web Server : Apache System : Linux servidor.eurohost.com.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : meusitei ( 1072) PHP Version : 5.6.40 Disable Function : show_source, system, shell_exec, passthru, proc_open MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/meusitei/public_html/painel/mkt/examples/ |
Upload File : |
<?php
/**
* This file contains an example of base setup for the MailWizzApi PHP-SDK.
*
* @author Serban George Cristian <cristian.serban@mailwizz.com>
* @link http://www.mailwizz.com/
* @copyright 2013-2017 http://www.mailwizz.com/
*/
//exit('COMMENT ME TO TEST THE EXAMPLES!');
// require the autoloader class if you haven't used composer to install the package
require_once dirname(__FILE__) . '/../MailWizzApi/Autoloader.php';
// register the autoloader if you haven't used composer to install the package
MailWizzApi_Autoloader::register();
// if using a framework that already uses an autoloading mechanism, like Yii for example,
// you can register the autoloader like:
// Yii::registerAutoloader(array('MailWizzApi_Autoloader', 'autoloader'), true);
/**
* Notes:
* If SSL present on the webhost, the api can be accessed via SSL as well (https://...).
* A self signed SSL certificate will work just fine.
* If the MailWizz powered website doesn't use clean urls,
* make sure your apiUrl has the index.php part of url included, i.e:
* http://www.mailwizz-powered-website.tld/api/index.php
*
* Configuration components:
* The api for the MailWizz EMA is designed to return proper etags when GET requests are made.
* We can use this to cache the request response in order to decrease loading time therefore improving performance.
* In this case, we will need to use a cache component that will store the responses and a file cache will do it just fine.
* Please see MailWizzApi/Cache for a list of available cache components and their usage.
*/
// configuration object
$config = new MailWizzApi_Config(array(
'apiUrl' => 'https://meusiteimobiliario.info/enviamkt/api/index.php',
'publicKey' => 'bc2b19afecd3dc13a8d20f1eff75e5a8227c5866',
'privateKey' => '93c8f2a76a363509e320ede66d67939600447a44',
// components
'components' => array(
'cache' => array(
'class' => 'MailWizzApi_Cache_File',
'filesPath' => dirname(__FILE__) . '/../MailWizzApi/Cache/data/cache', // make sure it is writable by webserver
)
),
));
// now inject the configuration and we are ready to make api calls
MailWizzApi_Base::setConfig($config);
// start UTC
date_default_timezone_set('UTC');