My experience on my daily works... helping others ease each other

Tuesday, December 20, 2016

json_decode(file_get_contents("php://input") on https

When you try to run json_decode on https, it will throw errors due to null value. file_get_contents("php://input") will also return null. Way to solve it and the most efficient are as follows //get data from caller $arrContextOptions=array(  "ssl"=>array( "verify_peer"=>false, "verify_peer_name"=>false, ), );   $your_data_array=...
Share:

About Me

Somewhere, Selangor, Malaysia
An IT by profession, a beginner in photography

Labels

Blog Archive

Blogger templates