Advertisement using the tenting API

Advertisement using the tenting API

Tenping advertisements are shown on Facebook, so I will write it as a test and PHP.

Through the revenue ranking within the tenting site, if you think about the total sales, you can operate for a long time;

If you have a good performance after the test, we will write a number of methods using tenting (click optimization, etc.).

(* Source is only for those who registered as seniors ㅎㅎ)

Anyway, this is an example of printing using Tenping API.

  1. Tenping subscription
  2. “Http://tenping.kr/api” access
  3. “API Guide” - Copy “Request URL”
  4. Copy where the source below
  5. Output using the $ tenping value
<?php

$cache_file = './data/list.json'; // 캐시파일 저장 위치
$cache_time = 1800; // 캐시할 시간

if(is_file($cache_file))
{
$data = file_get_contents($cache_file);

if(time()-filemtime($cache_file)>$cache_time = 1800) $data = '';
}

if(!$data)
{
// API 에서 복사한 Request URL 를 입력합니다.
// CampainType 은 아래에서 원하는 타입을 선택하여 더한 값입니다.
// (1:CPC+5, 2:CPA, 4:CPS, 8:CPI, 32:CPV, 64:CPADB, 128:CPC)
$url = 'http://tenping.kr/adbox/list?MemberID=?!?!?!?!?!?!?&CampaignType=129&MinClickPoint=30&MinCurrentPoint=1000';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);

file_put_contents($cache_file, $data);
}

$json = json_decode($data, true);

if($json['ResultCode'] == '200')
{
$tenping = $json['List'][mt_rand(0, count($json['List'])-1)];
 }

 // print the $ tenping value and use it.

 ?>

* If you are not registered with the API, you will not be able to check the unit price and the remaining amount of the tenting content.
Please register your senior with Prince@kilho.net, and tell me the 4 digits of the mobile phone by e -mail.
In the future, we will send you when the information related to tenting comes out ^^

guest
1 Comment
Inline Feedbacks
View all comments
쿠키죠
쿠키죠

안녕하세요 글은 잘보았습니다
혹시 어떻게 적용해야하는지 자세히 글 작성가능하신지 여쭈어봅니다..
텐핑 api관련해서는 글이 많이없어 부탁드립니다ㅠ