Skip to content

Instantly share code, notes, and snippets.

View yhunglee's full-sized avatar

Howard yhunglee

  • Taipei, Taiwan, R.O.C.
View GitHub Profile
@yhunglee
yhunglee / sample.png
Created June 29, 2017 13:49 — forked from jirutka/sample.png
Nested numbered list with correct indentation in CSS. Live example at http://jsfiddle.net/a84enL8k/.
sample.png
@yhunglee
yhunglee / get-ip-address-optimized.php
Created February 25, 2017 14:11 — forked from cballou/get-ip-address-optimized.php
PHP - Advanced Method to Retrieve Client IP Address
<?php
function get_ip_address() {
$ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR');
foreach ($ip_keys as $key) {
if (array_key_exists($key, $_SERVER) === true) {
foreach (explode(',', $_SERVER[$key]) as $ip) {
// trim for safety measures
$ip = trim($ip);
// attempt to validate IP
if (validate_ip($ip)) {
我的OSDC.TW 2013預計參加議程
Day1
第二會議室
10:00~14:30
1.Wissbi, A Distributed Event Toolkit to Process Big Data
2.Asynchronously C++
3.我如何停止憂慮並愛上 Non-MVC Web Framework
第一會議室