Skip to content

Instantly share code, notes, and snippets.

View hamaguchi's full-sized avatar

xxxx hamaguchi

  • Yokohama, Japan
View GitHub Profile
@hamaguchi
hamaguchi / gist:c7ff168689d8b902ca14
Created January 21, 2015 06:32
GoogleAnalytics_track
/**
* GoogleanAlyticsトラッキングを、PHPで強引に送信する
*
* @param type $long_url
* @param type $title
* @param type $remote_addr
* @param type $http_user_agent
*/
public static function googleanalytics_track($long_url, $title, $remote_addr, $http_user_agent)
{
@hamaguchi
hamaguchi / gist:3859558e2ef15dd817fb
Last active August 29, 2015 14:12
FuelPHPでパスワードとパスワード確認をValidationでやる方法
$val = Validation::forge();
$password = Input::post('password');
$confirm_password = Input::post('confirm_password');
$val->add('password', 'パスワード')
->add_rule('trim')
->add_rule('required')
->add_rule('min_length', 8)
->add_rule('max_length', 16)