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:

<?php

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

// Post It
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
'https://android.clients.google.com/market/api/ApiRequest');
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);
curl_close($ch);

// Debug
var_dump($result);




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