Soumettre la recherche
Mettre en ligne
ランダム文字ぽいものをつくる
•
0 j'aime
•
1,386 vues
Tetsuji Koyama
Suivre
PHPでランダム文字列ぽいものを作る方法
Lire moins
Lire la suite
Technologie
Affichage du diaporama
Signaler
Partager
Affichage du diaporama
Signaler
Partager
1 sur 10
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
Redis the better NoSQL
Redis the better NoSQL
OpenFest team
Client-side Storage 
Client-side Storage 
Tobias Wolf
Puppet Camp Amsterdam 2015: Manifests of Future Past
Puppet Camp Amsterdam 2015: Manifests of Future Past
Puppet
London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)
Dennis Knochenwefel
PuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with Puppet
Walter Heck
Prepared Statement 올바르게 사용하기
Prepared Statement 올바르게 사용하기
Kangjun Heo
Agile database access with CakePHP 3
Agile database access with CakePHP 3
José Lorenzo Rodríguez Urdaneta
12. CodeIgniter vederea inregistrarilor2
12. CodeIgniter vederea inregistrarilor2
Razvan Raducanu, PhD
Recommandé
Redis the better NoSQL
Redis the better NoSQL
OpenFest team
Client-side Storage 
Client-side Storage 
Tobias Wolf
Puppet Camp Amsterdam 2015: Manifests of Future Past
Puppet Camp Amsterdam 2015: Manifests of Future Past
Puppet
London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)
Dennis Knochenwefel
PuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with Puppet
Walter Heck
Prepared Statement 올바르게 사용하기
Prepared Statement 올바르게 사용하기
Kangjun Heo
Agile database access with CakePHP 3
Agile database access with CakePHP 3
José Lorenzo Rodríguez Urdaneta
12. CodeIgniter vederea inregistrarilor2
12. CodeIgniter vederea inregistrarilor2
Razvan Raducanu, PhD
San Francisco Java User Group
San Francisco Java User Group
kchodorow
Pm 4.0 permission_storage
Pm 4.0 permission_storage
Oleg K
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
Ian Barber
Teaching Your Machine To Find Fraudsters
Teaching Your Machine To Find Fraudsters
Ian Barber
13. CodeIgniter vederea inregistrarilor3
13. CodeIgniter vederea inregistrarilor3
Razvan Raducanu, PhD
Vcs28
Vcs28
Malikireddy Bramhananda Reddy
php plus mysql
php plus mysql
Jayson de Leon
Cache'owanie danych w PHP
Cache'owanie danych w PHP
Patryk Jar
Smelling your code
Smelling your code
Raju Mazumder
From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)
Night Sailer
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Tatsuhiko Miyagawa
wget.pl
wget.pl
Yasuhiro Onishi
Internationalizing CakePHP Applications
Internationalizing CakePHP Applications
Pierre MARTIN
Klug pgsql tut
Klug pgsql tut
selvamanisampath
ネイティブ開発アンチパターン
ネイティブ開発アンチパターン
Yuki Tamura
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤
Takahiro Inoue
How to stand on the shoulders of giants
How to stand on the shoulders of giants
Ian Barber
Dependency Injection
Dependency Injection
Rifat Nabi
TDDBC お題
TDDBC お題
Takuto Wada
MongoDB全機能解説2
MongoDB全機能解説2
Takahiro Inoue
Sxedia
Sxedia
soulosf
まつりとTシャツと私
まつりとTシャツと私
Tetsuji Koyama
Contenu connexe
Tendances
San Francisco Java User Group
San Francisco Java User Group
kchodorow
Pm 4.0 permission_storage
Pm 4.0 permission_storage
Oleg K
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
Ian Barber
Teaching Your Machine To Find Fraudsters
Teaching Your Machine To Find Fraudsters
Ian Barber
13. CodeIgniter vederea inregistrarilor3
13. CodeIgniter vederea inregistrarilor3
Razvan Raducanu, PhD
Vcs28
Vcs28
Malikireddy Bramhananda Reddy
php plus mysql
php plus mysql
Jayson de Leon
Cache'owanie danych w PHP
Cache'owanie danych w PHP
Patryk Jar
Smelling your code
Smelling your code
Raju Mazumder
From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)
Night Sailer
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Tatsuhiko Miyagawa
wget.pl
wget.pl
Yasuhiro Onishi
Internationalizing CakePHP Applications
Internationalizing CakePHP Applications
Pierre MARTIN
Klug pgsql tut
Klug pgsql tut
selvamanisampath
ネイティブ開発アンチパターン
ネイティブ開発アンチパターン
Yuki Tamura
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤
Takahiro Inoue
How to stand on the shoulders of giants
How to stand on the shoulders of giants
Ian Barber
Dependency Injection
Dependency Injection
Rifat Nabi
TDDBC お題
TDDBC お題
Takuto Wada
MongoDB全機能解説2
MongoDB全機能解説2
Takahiro Inoue
Tendances
(20)
San Francisco Java User Group
San Francisco Java User Group
Pm 4.0 permission_storage
Pm 4.0 permission_storage
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
Teaching Your Machine To Find Fraudsters
Teaching Your Machine To Find Fraudsters
13. CodeIgniter vederea inregistrarilor3
13. CodeIgniter vederea inregistrarilor3
Vcs28
Vcs28
php plus mysql
php plus mysql
Cache'owanie danych w PHP
Cache'owanie danych w PHP
Smelling your code
Smelling your code
From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)
20 modules i haven't yet talked about
20 modules i haven't yet talked about
wget.pl
wget.pl
Internationalizing CakePHP Applications
Internationalizing CakePHP Applications
Klug pgsql tut
Klug pgsql tut
ネイティブ開発アンチパターン
ネイティブ開発アンチパターン
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤
How to stand on the shoulders of giants
How to stand on the shoulders of giants
Dependency Injection
Dependency Injection
TDDBC お題
TDDBC お題
MongoDB全機能解説2
MongoDB全機能解説2
En vedette
Sxedia
Sxedia
soulosf
まつりとTシャツと私
まつりとTシャツと私
Tetsuji Koyama
FuelPHPを3ヶ月使ってみて
FuelPHPを3ヶ月使ってみて
Tetsuji Koyama
日本は世界一のITコミュニティ天国
日本は世界一のITコミュニティ天国
Tetsuji Koyama
LL Planets告知
LL Planets告知
Tetsuji Koyama
the History of LL events
the History of LL events
Tetsuji Koyama
Keires_DBリリースのご案内
Keires_DBリリースのご案内
Tetsuji Koyama
Traitsについて
Traitsについて
Tetsuji Koyama
PHPプログラミングのIPv6対応の実際
PHPプログラミングのIPv6対応の実際
Tetsuji Koyama
The Widgetization Of Media by Futurist Gerd Leonhard (MIPCOM 2008)
The Widgetization Of Media by Futurist Gerd Leonhard (MIPCOM 2008)
Gerd Leonhard
LLまつりに行こう!
LLまつりに行こう!
Tetsuji Koyama
PHP Frameworks with IPv6
PHP Frameworks with IPv6
Tetsuji Koyama
IPv6の闇とPHP
IPv6の闇とPHP
Tetsuji Koyama
開発ライセンスとプログラマーの自由
開発ライセンスとプログラマーの自由
Tetsuji Koyama
PHPで使うIPv6の実際
PHPで使うIPv6の実際
Tetsuji Koyama
the Histrory of LT and ドラ娘
the Histrory of LT and ドラ娘
Tetsuji Koyama
FuelPHP で DynamoDB
FuelPHP で DynamoDB
Tetsuji Koyama
En vedette
(17)
Sxedia
Sxedia
まつりとTシャツと私
まつりとTシャツと私
FuelPHPを3ヶ月使ってみて
FuelPHPを3ヶ月使ってみて
日本は世界一のITコミュニティ天国
日本は世界一のITコミュニティ天国
LL Planets告知
LL Planets告知
the History of LL events
the History of LL events
Keires_DBリリースのご案内
Keires_DBリリースのご案内
Traitsについて
Traitsについて
PHPプログラミングのIPv6対応の実際
PHPプログラミングのIPv6対応の実際
The Widgetization Of Media by Futurist Gerd Leonhard (MIPCOM 2008)
The Widgetization Of Media by Futurist Gerd Leonhard (MIPCOM 2008)
LLまつりに行こう!
LLまつりに行こう!
PHP Frameworks with IPv6
PHP Frameworks with IPv6
IPv6の闇とPHP
IPv6の闇とPHP
開発ライセンスとプログラマーの自由
開発ライセンスとプログラマーの自由
PHPで使うIPv6の実際
PHPで使うIPv6の実際
the Histrory of LT and ドラ娘
the Histrory of LT and ドラ娘
FuelPHP で DynamoDB
FuelPHP で DynamoDB
Similaire à ランダム文字ぽいものをつくる
PHP Tips & Tricks
PHP Tips & Tricks
Radek Benkel
The History of PHPersistence
The History of PHPersistence
Hugo Hamon
Perl6 a whistle stop tour
Perl6 a whistle stop tour
Simon Proctor
Perl6 a whistle stop tour
Perl6 a whistle stop tour
Simon Proctor
Introdução ao Perl 6
Introdução ao Perl 6
garux
Crazy things done on PHP
Crazy things done on PHP
Taras Kalapun
Top 10 php classic traps
Top 10 php classic traps
Damien Seguy
php global $bsize,$playerToken,$myToken,$gameOver,$winArr,$rowAr.pdf
php global $bsize,$playerToken,$myToken,$gameOver,$winArr,$rowAr.pdf
anjalitimecenter11
The Perl6 Type System
The Perl6 Type System
abrummett
Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB
jhchabran
Bag of tricks
Bag of tricks
brian d foy
You code sucks, let's fix it
You code sucks, let's fix it
Rafael Dohms
Presentation1
Presentation1
Rahadyan Gusti
Hidden treasures of Ruby
Hidden treasures of Ruby
Tom Crinson
JavaScript for PHP developers
JavaScript for PHP developers
Stoyan Stefanov
How to write code you won't hate tomorrow
How to write code you won't hate tomorrow
Pete McFarlane
Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02
Seri Moth
Tgh.pl
Tgh.pl
iskabom
PHP 5.4
PHP 5.4
Federico Damián Lozada Mosto
Drupal Development (Part 2)
Drupal Development (Part 2)
Jeff Eaton
Similaire à ランダム文字ぽいものをつくる
(20)
PHP Tips & Tricks
PHP Tips & Tricks
The History of PHPersistence
The History of PHPersistence
Perl6 a whistle stop tour
Perl6 a whistle stop tour
Perl6 a whistle stop tour
Perl6 a whistle stop tour
Introdução ao Perl 6
Introdução ao Perl 6
Crazy things done on PHP
Crazy things done on PHP
Top 10 php classic traps
Top 10 php classic traps
php global $bsize,$playerToken,$myToken,$gameOver,$winArr,$rowAr.pdf
php global $bsize,$playerToken,$myToken,$gameOver,$winArr,$rowAr.pdf
The Perl6 Type System
The Perl6 Type System
Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB
Bag of tricks
Bag of tricks
You code sucks, let's fix it
You code sucks, let's fix it
Presentation1
Presentation1
Hidden treasures of Ruby
Hidden treasures of Ruby
JavaScript for PHP developers
JavaScript for PHP developers
How to write code you won't hate tomorrow
How to write code you won't hate tomorrow
Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02
Tgh.pl
Tgh.pl
PHP 5.4
PHP 5.4
Drupal Development (Part 2)
Drupal Development (Part 2)
Dernier
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Nanddeep Nachan
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
apidays
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
The Digital Insurer
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
The Digital Insurer
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
apidays
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
The Digital Insurer
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
lior mazor
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Jeffrey Haguewood
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Martijn de Jong
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
Dernier
(20)
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
ランダム文字ぽいものをつくる
1.
koyama@hoge.org
1
2.
about me id:koyhoge 2007
OSS 2
3.
agenda id
generate encode/decode 3
4.
RFC4648 The Base16, Base32,
and Base64 Data Encodings Base 64 Encoding with URL and Filename Safe Alphabet base64url + → -, / → _ 4
5.
id
generate DB Sequence id 1 → NWoZK3kTsExUV00Ywo1G5jlU 2 → 2kuSN7rMzfGcB2DKt67EqDWQ 5
6.
static public function
genUniqHash($input, $options = null) { $seed = array_val($options, 'seed', 0); $length = array_val($options, 'length', 18); / 18 = non-padding max / static $search = array('+', '/'); static $replace = array('-', '_'); / limit check: sha1() returns 20 bytes / if (($length <= 0) || (20 < $length)) { $length = 20; } if (($seed + $length) > 20) { $seed = 20 - $length; } $out = base64_encode(substr(sha1($input, true), $seed, $length)); return str_replace($search, $replace, $out); } 6
7.
encode/decode gzip
+base64url 7
8.
static public function
tinyEncode($input) { static $search = array('+', '/'); static $replace = array('-', '_'); $gzed = gzdeflate($input); $encoded = base64_encode($gzed); $result = str_replace($search, $replace, $encoded); / trim trailing '=' / return rtrim($result, '='); } 8
9.
static public function
tinyDecode($encoded) { static $search = array('-', '_'); static $replace = array('+', '/'); $str = str_replace($search, $replace, $encoded); $decoded = base64_decode($str); return gzinflate($decoded); } 9
10.
Thanks for hearing
10
Télécharger maintenant