servicein/leadclient
Composer 安装命令:
composer require servicein/leadclient
包简介
Client PHP to send Lead at Servicein/CloudCare
README 文档
README
Lead Client is a PHP client that makes it easy to send Lead at Servicein/Cloudcare.
This library require an additional info for work, you must define three constants:
- API_URL
- API_KEY
- DEFAULT_CAMPAIGN
The constant value should be asked to the commercial department.
define("API_URL", "**asked to the commercial department**"); define("API_KEY", "**asked to the commercial department**"); define("DEFAULT_CAMPAIGN", "**asked to the commercial department**"); //define("PROXY", "tpc://xxx.xxx.xxx.xxx:3128"); $lead = new Lead(); $lead->setFirstname("Tester") ->setLastname("Tester") ->setMail("tester@test.com") ->setPhone("33333333333") ->setCity("Roma") ->setProvince("RM") ->setSex("M") ->setNote("Nota"); # set other campaign ->setCampaign("OTHER_CAMPAIGN") try{ $leadClient = new Client($lead); $result = $leadClient->sendLead(); if($result->isValid()){ echo "Lead successfully loaded".PHP_EOL; }else{ echo "Error: ".$result->message.PHP_EOL; } } catch (Exception $ex) { echo $ex->getMessage().PHP_EOL; }
Installing Lead Client
The recommended way to install Client is through Composer.
# Install Composer curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install the latest stable version of Client:
php composer.phar require servicein/leadclient
After installing, you need to require Composer's autoloader:
require 'vendor/autoload.php';
You can then later update Client using composer:
composer.phar update
统计信息
- 总下载量: 76
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-16