Tag Archives: php

Laravel using Flysystem accessing AWS S3 storage

With the package Flysystem, we could easily access files stored in AWS S3 Config edit the config file in /config/filesystems.php, change the AWS key pair accordingly Installing Amazon S3 Driver Before using the S3 storage, package has to be installed … Continue reading

Posted in Development | Tagged , , , | Leave a comment

Getting client’s real IP behind reverse proxy

The problem: when try to retrieve client’s ip in Laravel with $request->ip(); it always return the reverse proxy IP address. In order to retrieve the client’s real IP the frontend server has to forward the client’s IP into the backend … Continue reading

Posted in Development | Tagged , , , | Leave a comment

Laravel using captcha validation

install captcha dependence with composer add the class interface into ‘providers’ section in config/app.php define alias into the ‘alias’ section execute command to create configuration file edit the config file accordingly in config/captcha.php the code to show the captcha in … Continue reading

Posted in Development | Tagged , , | Leave a comment

PHP convert character encoding to UTF-8

a simply function that detect character code and covert to UTF-8

Posted in Development | Tagged , , | Leave a comment

Convert number into chinese string with php

convert from int to chinese string e.g. 125 -> 一百二十五 2. convert from chinese string into int, eg. 一百二十五 > 125

Posted in Development | Tagged , | Leave a comment