Web Analytics
 Contoh CURL Respons Pretty

Contoh CURL Respons Pretty


<?php

 

$key = rand(000000000, 999999999);

 

$id = $key;

 

$curl = curl_init();

 

curl_setopt_array($curl, array(

    CURLOPT_URL => 'http://localhost:8000/sessions/add',

    CURLOPT_RETURNTRANSFER => true,

    CURLOPT_ENCODING => '',

    CURLOPT_MAXREDIRS => 10,

    CURLOPT_TIMEOUT => 0,

    CURLOPT_FOLLOWLOCATION => true,

    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,

    CURLOPT_CUSTOMREQUEST => 'POST',

    CURLOPT_POSTFIELDS => 'id=' . $id . '&isLegacy=false',

    CURLOPT_HTTPHEADER => array(

        'Content-Type: application/x-www-form-urlencoded'

    ),

));

 

$response = curl_exec($curl);

 

curl_close($curl);

 

echo "<pre>";

 

print_r(json_decode($response));

 

echo "</pre>";


 

/*

$json2 = json_decode($response, true);

$qr = $json2["qr"];

 

echo $qr;

*/


Lanjut Part : 1
Jam : 14:54:04
Durasi Part : 0:0:1
Durasi Total : 0:0:1

Punya Pertanyaan , Silahkan Whatsapp Langsung
Muhammad Ullil Fahri
WA : 089696380422
Tautan WA : https://wa.me/message/SG4YA2XQP5FPE1
Theme Customizer

Theme Styles