Skip to content

Instantly share code, notes, and snippets.

View nimid's full-sized avatar

Saroj Sangphongamphai nimid

View GitHub Profile
<?php
$file = fopen('utf8.txt', 'r');
$content = fread($file, filesize('utf8.txt'));
$converted_content = mb_convert_encoding($content, 'SJIS', 'UTF-8');
echo $converted_content;
$fp = fopen('sjis.txt', 'w');
fwrite($fp, $converted_content);
fclose($fp);
docker run \
-d \
--name wordpress-4.9.1 \
--link mysql:mysql \
-e WORDPRESS_DB_NAME=wordpress-4.9.1 \
-v /home/user/docker/wordpress/4.9.1/:/var/www/html/ \
-p 4910:80 \
wordpress:4.9.1
<?php
// how to run:
// php download_refunds.php
// Works on Mac OS X
// It will generate (and overwrite) a csv file with name refunds.csv
// Update your valid Live Secret Key, this is only a test key:
$skey = 'skey_';
// Output file name
<?php
// how to run:
// php download_disputes.php
// Works on Mac OS X
// It will generate (and overwrite) a csv file with name disputes.csv
// Update your valid Live Secret Key, this is only a test key:
$skey = 'skey_';
// Output file name