-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.php
More file actions
30 lines (22 loc) · 822 Bytes
/
Copy pathexample.php
File metadata and controls
30 lines (22 loc) · 822 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
<?php
include('Api.php');
clickscloud\Api::$KEY = 'Enter Your key';
clickscloud\Api::$ID = 'Enter Your id';
/**
* Получить список кампаний
*/
$list = clickscloud\Api::getCampaignList(true);
/*
* Добавить тизер в кампанию
* */
$image = base64_encode(file_get_contents('http://www.prikol.ru/wp-content/gallery/october-2017/kartinki-04102017-001.jpg'));
$newTeaser = clickscloud\Api::createTeaser($campaign_id, 'Новый способо избавиться от ...', 'http://yandex.ru', 5, file_get_contents(), $image);
/*
* Сменить цену
* */
$data = clickscloud\Api::getTeaserTogglePrice($campaign_id, $newTeaser['id'], 3.2);
/*
* Остановить тизер
* */
$data = clickscloud\Api::teaserToggle($campaign_id, $newTeaser['id'], 0);
?>