Author - 오길호

The server was transferred.

The main domain (excluding sub -domain) moved the server operated. Previously, I was receiving services at Cafe 24, and I received an answer that OpenSSL upgrade was impossible due to problems such as CentOS version, and I modified the source of WordPress core and plug -in, and operated it as a temporary measure. It was. Currently, several users have moved to Ivy Hosting, which recommended WordPress hosting. You may not be able to access several hours, such as changing the name server ...

HTTP access information record

When using OpenAPI, it is to check whether the test and access information is properly Messos value, host, POST value when connecting[PHP] <? $log = $_SERVER['REQUEST_METHOD'].' '.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."nn"; foreach($_SERVER as $k => $v) { if($k=='HTTP_HOST') continue; if(substr($k, 0,5)!='HTTP_') continue; $log .= '$k: $v'."n"; } $log .= "n"; $post = array_map('urldecode', explode('&', file_get_contents('php://input'))); foreach($post as $v) { $log .= "$vn"; } $log .= "-----------------------------------n"; file_put_contents('log.txt', $log, FILE_APPEND | LOCK_EX); ?> [/PHP]

Create shortcut links using Google API

I needed a short link, so I made it PHP. You can use it after registering Google API. How to use: Shortur_google ('original address', 'API key'); <? PHP Function Shortur_google ($ URL, $ Key) { $ post = array ('LONGURL' => $ URL); $ json = json_encode ($ post); $ curlobj = curl_init (); curl_setopt ($ curlobj, curlopt_url, 'https://www.googleapis.com/urlshortener/v1/url?key='..nkey); CURL_SETOPT ($ curlobj, curlopt_returntransfer, 1); CURL_SETOPT ($ curlobj, curlopt_ssl_verifypeer, 0); CURL_SETOPT ($ curlobj, curlopt_Header, 0); curl_setopt ($ curlobj, curlopt_httpHeader, Array ('Content-Type: Application/JSON' '); CURL_SETOPT ($ curlobj, curlopt_post, 1); CURL_SETOPT ($ curlobj, curlopt_postfields, $ json); $ json = json_decode (curl_exec ($ curlobj)); curl_close ($ curlobj); return $ json-> ID; } Echo Shortur_google ('http://kalmuri.kilho.net/', 'API-KEY-API-KEY-Api-Key'); ?>

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. Tenping subscription "http://tenping.kr/api" ...