w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
how to convert python httplib.HTTPSConnection to php

Can you try this:


// Data
$postfields = array(
    'version' => 2,
    'request' => $request

// Post It
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($ch);

// Debug

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.