14 September 2017

php://input

Actually php://input allows you to read raw POST data.

php://input is not available with enctype="multipart/form-data".





So, if you simply POST a good old HTML form, the request looks something like this:
POST /page.php HTTP/1.1

key1=value1&key2=value2&key3=value3



request with a JSON-payload would look something like this:
POST /page.php HTTP/1.1

{"key1":"value1","key2":"value2","key3":"value3"}
The content would now be application/json (or at least none of the above mentioned), so PHP's $_POST-wrapper doesn't know how to handle that (yet).
The data is still there, you just can't access it through the wrapper($_POST). So you need to fetch it yourself in raw format with file_get_contents('php://input') (as long as it's not multipart/form-data-encoded).




ref:  https://stackoverflow.com/questions/8893574/php-php-input-vs-post

13 September 2017

Thunderbird baca Microsoft Exchange

EWS_URL
   https:///EWS/Exchange.asmx

vpn vs mtu

Kadang-kadang akan ada masalah dengan vpn. Contoh website boleh dibuka dari host Windows, tapi tak boleh dari ubuntu.

Salah satu penyebab adalah size MTU(Max Transfer Unit)

Secara asal, MTU utk host Windows adalah 1300, manakala ubuntu 17 pula adalah 1500.

Cara nak kecilkan saiz mtu dalam linux

# ifconfig mtu 1300




Simtom kes di atas, bila TLS Handshake  tersangkut masa Server Hello(no 'Server Finish')

11 September 2017

BitCoin ... Blockchain

Bitcoin:
https://www.youtube.com/watch?v=l9jOJk30eQs



BlockChain
https://youtu.be/_160oMzblY8

06 September 2017

Current DNS setting

Utk mengetahui komputer guna DNS server yg mana:

# nmcli device show

or

$ systemd-resolve --status

16 August 2017

disable touchpad and touchscreen on ubuntu

xinput list   <-- device="" get="" id="" p="">
xinput disable 15


https://askubuntu.com/questions/885160/cant-permanently-disable-touchpad