Skip to content

Chris' Laboratory

chrislee.kr – Personal blog as bookshelves

Menu
  • Home
  • Github
  • Contact Me
Menu

Category: PHP

실시간 환율 받아오기 (Get real-time currency information)

Posted on 21/11/202028/11/2020 by Chris Lee

Code snippet to retrieve real-time currency from exchangeratesapi.io

Continue reading

[PHP+MySQL] 간단한 카카오 i 오픈빌더 챗봇 만들기 (Kakao i Open Builder)

Posted on 29/03/201929/08/2020 by Chris Lee

카카오 i 오픈빌더 (Kakao i Open Builder)를 이용한 플러스 친구 챗봇 (PHP + MySQL) 백엔드 프로젝트 이 프로젝트는 샘플 테스트용으로 카카오톡 플러스 친구 챗봇을 구현하기 위해 만들어졌습니다. 이 프로젝트는 아주 기본 기능만을 구현하였습니다. Production 환경에서는 사용하기에 부족함이 많으니 참고용으로만 사용하시기 바랍니다. 테스트 커뮤니티 챗봇: http://pf.kakao.com/_vAKtj Backend API: https://kakao.chrislee.kr Backend 소스코드: https://github.com/chrisleekr/kakao-plusfriend-bot-backend 개발 환경 PHP 7.2…

Continue reading

Time Clock Management System developed with Yii2 REST API + Angular 2 + Docker

Posted on 22/01/201722/01/2017 by Chris Lee

Time Clock Management System (Yii2 REST API + Angular 2 + Docker)   Source Repo: https://github.com/chrisleekr/time-clock-management-system-yii2-rest-api-angular2-docker   This is a personal project for learning Angular 2. The project contains two applications, one for REST API backend, and the another for Angular 2 frontend. The project involves: Yii2 for providing RESTful API including user login/logout, managing global…

Continue reading

Missing Authroization header in request

Posted on 06/01/201722/01/2017 by Chris Lee

When developing REST API in Yii2, I found some development environments do not populate Authorization header in the request; as a result, I was not able to use HttpBearerAuth because the headers were missing in the request. Note that I still can use QueryParamAuth; although, I insist on using HttpBearerAuth instead of QueryParamAuth.   The…

Continue reading

Get AWS EC2 tags to environment parameters for apache2

Posted on 17/12/201622/01/2017 by Chris Lee

Objective: AWS instances are assigned tags per instance. Need tags to be environment parameters for Apache2; thus, web application can retrieve environment parameter.   Step 1: Configure tags in AWS EC2 instance   Step 2: Setup IAM user and get access key id and secret access key   Step 3: Access to SSH and append…

Continue reading

PHP imap_open() error – INBOX: invalid remote specification (errflg=2)

Posted on 31/10/2016 by Chris Lee

INBOX: invalid remote specification (errflg=2)   Got following error when use imap_open() in PHP?   Notice: Unknown: Can’t open mailbox {imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX: invalid remote specification (errflg=2) in Unknown on line 0   Check imap enabled SSL support like screenshot   If cannot see SSL Support configuration, then need re-compile imap.so with enabling SSL support.     PHP…

Continue reading

PTV Timetable API sample code for PHP

Posted on 11/10/201611/10/2016 by Chris Lee

API Page: https://www.ptv.vic.gov.au/about-ptv/ptv-data-and-reports/digital-products/ptv-timetable-api/ptv-timetable-api-reference/   1. Request API key by sending email How to register for a key and developer ID > Send an email to APIKeyRequest@ptv.vic.gov.au with the following information in the subject line of the email: • “PTV Timetable API – request for key” > Once we’ve got your email request, we’ll send you a…

Continue reading

Configure Aptana to support PHP 5.4

Posted on 20/04/201523/11/2015 by Chris Lee

I am using Aptana Studio 3 in Mac. When I try to set PHP 5.4 environment in project settings, it does not save the changes. And found this article – http://stackoverflow.com/questions/24633995/aptana-php-version-doesnt-stick-in-project-properties 1. Open project folder 2. Create folder .settings 3. Create file com.aptana.editor.php.prefs and Put below content into created file eclipse.preferences.version=1 phpVersion=php5.4 4. Close project and re-open

Continue reading

Sample XAMPP MySql my.ini Fast Performance

Posted on 23/09/201429/08/2020 by Chris Lee

Only use in local test MySQL. # Example MySQL config file for large systems. # # This is for a large system with memory = 512M where the system runs mainly # MySQL. # # MySQL programs look for option files in a set of # locations which depend on the deployment platform. # You…

Continue reading

SmartOptimizer with CS-Cart optimization

Posted on 16/09/201410/09/2016 by Chris Lee

Reference: http://forum.cs-cart.com/topic/29499-speed-up-and-optimise-cs-cart-version-3/ In store root .htaccess DirectoryIndex index.html index.php <IfModule mod_rewrite.c> RewriteEngine on # Pleas note that RewriteBase setting is obsolete use it only in case you experience some problems with SEO addon. # Some hostings require RewriteBase to be uncommented # Example: # Your store url is http://www.yourcompany.com/store/cart # So “RewriteBase” should be: #…

Continue reading

money_format_alt

Posted on 04/06/201410/09/2016 by Chris Lee

Alternative code snippet for money_format function money_format_alt($amount, $decimal, $symbol = ‘$’, $symbol_right = ”, $symbol_thousands = ‘,’, $symbol_decimal = ‘.’) { if ($amount < 0) return ‘-‘.$symbol . (number_format(abs($amount), $decimal, $symbol_decimal, $symbol_thousands)) . $symbol_right; return $symbol.number_format($amount, $decimal, $symbol_decimal, $symbol_thousands).$symbol_right; }  

Continue reading

.htaccess GZIP Compression & Enable Keep-alive

Posted on 07/03/201410/09/2016 by Chris Lee

To make faster webpage loading, use Gzip compress and Enable keep-alive in htaccess <ifModule mod_deflate.c> AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript </ifModule> <ifModule mod_headers.c> Header set Connection keep-alive </ifModule>   In Plesk Control Panel, follow below steps Access SSH as root user Go to /var/www/vhosts/{domain}/conf Create or Modify vhosts.conf Add following code…

Continue reading

To re-size images with keeping aspect ratio and fitting to certain dimensions

Posted on 07/06/201310/09/2016 by Chris Lee

To re-size images with keeping aspect ratio and fitting to certain dimensions function _create_thumbnail($actual_filepath, $folder_path, $target_filename, $width, $height) { // $this->load->library(‘image_lib’); // $image_lib_config = array( // ‘image_library’ => ‘gd2’ // , ‘source_image’ => $actual_filepath // , ‘new_image’ => $folder_path.$target_filename // , ‘maintain_ratio’ => true // , ‘width’ => $width // , ‘height’ => $height //…

Continue reading

Draw Polygons in Google Maps and Determine whether an Address is in Polygons

Posted on 21/03/201321/03/2013 by Chris Lee

Draw Polygons in Google Maps and Determine whether an Address is in Polygons This sample source code uses Google Maps Javascript API V3 to draw polygons in Google Maps. (Refer https://google-developers.appspot.com/maps/documentation/javascript/examples/drawing-tools) The address auto-complete uses Google Places Javascript library. (Refer https://developers.google.com/maps/documentation/javascript/places#places_autocomplete) The server-side code will retrieve address’ latitude and longitude using Google Gecoding API. (Refer…

Continue reading

네이버에서 실시간 환율 정보 받기 (Get real-time currency information from Naver)

Posted on 06/10/201121/11/2020 by Chris Lee

업데이트 버젼 (Updated Version): https://chrislee.kr/wp/2020/11/21/%ec%8b%a4%ec%8b%9c%ea%b0%84-%ed%99%98%ec%9c%a8-%eb%b0%9b%ec%95%84%ec%98%a4%ea%b8%b0-get-real-time-currency-information/ 실시간 환율 정보를 받기 위해 자료를 찾아보는 중, 네이버 환율 API를 발견하였다. ( [출처] 네이버 환율정보 api 이용한 php 위젯 개발 하기 |작성자 usback]) http://www.naver.com/include/timesquare/widget/exchange.xml 여기서 의문점은 저 블로그에서 xml 주소를 열어보면, xml 정보가 보이지만 저 주소를 복사 한 뒤 볼려고 하면, 퍼미션 에러가 난다. 결론은 저 xml은 레퍼러 체크를…

Continue reading

PHP Proxy Script

Posted on 04/08/2011 by Chris Lee

Quoted from http://phpproxies.com/ Proxy Scripts Glype Glype is new, released just in January 2009, but it has already been downloaded 15,000 times. PHP Web Proxy This script is used for many different proxy sites, download it through SourceForge. PHPProxy Freshmeat.net’s script can turn your web host’s server into a proxy server in no time. If…

Continue reading

unserialize() [function.unserialize]: Error at offset 00000 of 0000 bytes

Posted on 12/07/201111/09/2016 by Chris Lee

If serialize string contains ‘&amp;’, then the error occurs when unserialize the string. unserialize() [function.unserialize]: Error at offset 00000 of 0000 bytes   Simply change ‘&amp;’ to ‘&’, by replacing it. $string = str_replace(‘&amp;’, ‘&’, $string); $test_array = unserialize($string);    

Continue reading

Categories

  • Adobe Flex (2)
  • Android (20)
  • Angular (ngx) (3)
  • Arduino (2)
  • Codeigniter (6)
  • CSS (5)
  • Django (2)
  • Docker (5)
  • E-Commerce (6)
  • Finance (2)
  • General Documents (15)
  • Google App Engine (5)
  • Helm (1)
  • iPhone (13)
  • Javascript (13)
  • Kubernetes (2)
  • Linux (13)
  • Magento (8)
  • Marketing (3)
  • MongoDB (4)
  • MS-SQL (1)
  • MySQL (6)
  • Node.js (6)
  • PHP (17)
  • Platforms (1)
  • Raspberry Pi (5)
  • React Native (4)
  • React.js/Next.js (2)
  • Samsung Smart TV (4)
  • Security (17)
  • Sencha Touch (4)
  • Server (31)
  • SVN (7)
  • Terraform (1)
  • Tools (7)
  • Uncategorized (1)
  • VirtualBox (1)
  • Vue.js (1)
  • Web Development (7)
  • WordPress (4)
  • Yii2 (3)

Search

Recent Posts

  • Gitlab Helm upgrade failed to register Gitlab runner 403 Forbidden
  • Run docker-dind and docker in Kubernetes cluster
  • Next.js Tutorial – Setting up your database in your local development environment
  • helm list error stream ID 3; INTERNAL_ERROR
  • Bootstrapping Kubernetes cluster with kubeadm

Recent Comments

  • Vadim on Alpine – Plugin caching_sha2_password could not be loaded
  • Andris on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins
  • Obayed on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins
  • Ari on How to install memcache.so/memcached.so for MAMP Pro (Mac)
  • Mida ali on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins

Tags

1 ajax amazon android android-addpart browser chrislee-kr codeigniter codeigniter-tcpdf com-apple-net-racoon CSS CSS history hack delpaigmail-com entity-addpart-double exception-printing-is-disabled-by-default-for-security-reasons ext-plugins-listpagingplugin ext-plugins-listpagingplugin-example f iphone javascript jquery-defaultchecked jquery-samsung-smart-tv listpagingplugin mac magento-exception-printing-is-disabled-by-default-for-security-reasons magento-sample-data-exception-printing-is-disabled-by-default-for-security-reasons nu-vot null-core-errors-confignotfound-config-mk9engine-ini php samsung-smart-tv-jquery samsung-smart-tv-sdk-ajax samsung-smart-tv-sdk-jquery samsung-tv-sdk samsung-tv-sdk-jquery samsung tv sencha-smart-tv sencha-touch-list-paging smart-tv-jquery sqlite subversion svn tcedook tcpdf-codeigniter uilinebreakmodecharacterwrap-is-deprecated unknown-column-link-area

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2025 Chris' Laboratory | Powered by Minimalist Blog WordPress Theme
 

Loading Comments...