Memposting data menggunakan curl php

Pada artikel ini, kita akan melihat cara mengirimkan Data JSON di URL menggunakan CURL di PHP, bersama dengan memahami berbagai cara untuk mengirimkan data di URL melalui ilustrasi. CURL adalah singkatan dari URL klien, yang memungkinkan kami untuk terhubung dengan URL lain & menggunakan tanggapan mereka dalam kode kami, mis. e. , ini adalah alat untuk mengirim dan menerima file menggunakan sintaks URL. CURL memfasilitasi cara yang dapat menekan URL dari kode kami untuk mendapatkan respons HTML darinya. Curl juga digunakan dalam baris perintah atau skrip untuk transfer data. Di sini, kita perlu mengirimkan data JSON di URL menggunakan cURL di PHP dan menangani permintaan POST. Tugas ini dapat diselesaikan dengan bantuan cara-cara berikut

  • permintaan cURL POST
  • Permintaan DAPATKAN cURL
  • Permintaan PUT cURL

Kami akan mengeksplorasi semua pendekatan di atas & memahaminya melalui contoh

Sintaks untuk meneruskan data JSON dalam URL menggunakan cURL

<?php
    $url = "https://reqres.in/api/users";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
    $resp = curl_exec($ch);
    curl_close($ch);
?>
  • Dengan menggunakan Curl POST Request

Pendekatan untuk Permintaan POST

  • Kita perlu menentukan URL, dimana data JSON perlu dikirim
  • Menggunakan curl_init(), kami menginisialisasi cURL
  • Masukkan data JSON ke dalam larik PHP dan siapkan data JSON
  • Dan menggunakan json_encode() menyandikannya ke dalam string JSON
  • Mengatur opsi untuk cURL
    • Mengambil $url menggunakan CURLOPT_URL
    • Mengganti jenis permintaan dari get to post menggunakan CURLOPT_POST
    • Sekarang lampirkan string yang disandikan di bidang posting menggunakan CURLOPT_POSTFIELDS
    • Menyetel opsi curl RETURNTRANSFER ke true sehingga mengembalikan respons alih-alih hanya mengeluarkannya
    • Menggunakan CURLOPT_HTTPHEADER atur Content-Type ke application/JSON
  • Mengatur beberapa opsi untuk sesi Curl. Menggunakan fungsi curl_setopt_array() , mengatur sejumlah besar opsi untuk cURL tanpa memanggilnya berulang kali
  • Menggunakan curl_exec() untuk mengeksekusi permintaan POST
  • Dekode respons dan Mengembalikan respons sebagai string
  • Tutup lengkungan

Contoh 1. Contoh ini mengilustrasikan pengiriman Data JSON dalam URL menggunakan cURL di PHP dengan menggunakan Permintaan POST cURL

PHP




<?php

  //URL, Where the JSON data is going to be sent

  // sending post request to reqres.in

  

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
0
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
1
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
2
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
3

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
_4

  

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
6

  

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
8
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
9

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
_4

  

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
2

  

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
4
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
1
Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
6
Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
7

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8
Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
9
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
0
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
1
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
2

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
4
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
0
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
6
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
2

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
9
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
0<?php1

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8<?php3

  <?php5 <?php6

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
4<?php3

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
_4

    1

    3

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
1
Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
6
Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
7

  7

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8  9

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8//URL, Where the JSON data is going to be sent1
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
0
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
2

  7

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8//URL, Where the JSON data is going to be sent6

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8//URL, Where the JSON data is going to be sent8

  7

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8  1

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8  3<?php5
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
2

  7

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8  8

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8// sending post request to reqres.in0

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8// sending post request to reqres.in2

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8// sending post request to reqres.in4

  7

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8// sending post request to reqres.in7

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8// sending post request to reqres.in9
Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
6
Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
7  2  3

  <?php3

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
_4

  ________87______8

  

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
00
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
8
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
2  3<?php3

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
_4

  

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
_07

  

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
09
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
10
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
8<?php3

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
_4

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
15

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
17
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
18
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
09________86______3

Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
8
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
22
Array ( [page] => 2 [per_page] => 6 [total] => 12 [total_pages] => 2 [data] => 
Array ( [0] => Array ( [id] => 7 [email] => [email protected] [first_name] => 
Michael [last_name] => Lawson [avatar] => https://reqres.in/img/faces/7-image.jpg ) 
[1] => Array ( [id] => 8 [email] => [email protected] [first_name] => 
Lindsay [last_name] => Ferguson [avatar] => https://reqres.in/img/faces/8-image.jpg ) 
[2] => Array ( [id] => 9 [email] => [email protected] [first_name] => 
Tobias [last_name] => Funke [avatar] => https://reqres.in/img/faces/9-image.jpg ) 
[3] => Array ( [id] => 10 [email] => [email protected] [first_name] => Byron [last_name] => 
Fields [avatar] => https://reqres.in/img/faces/10-image.jpg ) 
[4] => Array ( [id] => 11 [email] => [email protected] [first_name] => George [last_name] => 
Edwards [avatar] => https://reqres.in/img/faces/11-image.jpg ) 
[5] =>Array ( [id] => 12 [email] => [email protected] [first_name] => Rachel [last_name] => 
Howell [avatar] => https://reqres.in/img/faces/12-image.jpg ) ) [support] => 
Array ( [url] => https://reqres.in/#support-heading  => To keep ReqRes free, 
contributions towards server costs are appreciated! ) )
7
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
17
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
25
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
26
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
updatedAt: 2022-12-02T12:34:59.262Z
0
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
28
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
29

Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
30
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
31
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
26
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
33
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
34
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
33
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
28
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
33
Employee: Aman
Job: Data Scientist
Company: GeeksForGeeks
id: 553
createdAt: 2022-12-02T12:32:42.420Z
38________1______3

Bagaimana Anda POST data dengan Curl?

Mengirim Permintaan POST dengan Curl. Untuk membuat permintaan POST dengan Curl, Anda dapat menjalankan alat baris perintah Curl dengan opsi baris perintah -d atau --data dan meneruskan data sebagai argumen kedua. Curl will automatically select the HTTP POST method and application/x-www-form-urlencoded content type for the transmitted data.

Bagaimana cara POST data JSON menggunakan Curl di PHP?

Untuk memposting JSON ke server menggunakan library PHP Curl, Anda harus terlebih dahulu menginisialisasi library PHP Curl dengan memanggil curl_init() dan kemudian meneruskan URL target dengan memanggil curl_setopt() dengan parameter "CURLOPT_URL". Data JSON dapat diteruskan ke PHP Curl dengan memanggil curl_setopt($curl, CURLOPT_POSTFIELDS, $data)

Bisakah Anda POST dengan Curl?

Permintaan Posting Curl . (Baca lebih lanjut tentang permintaan POST di sini. ) Format permintaan POST dengan curl adalah. curl -X POST [opsi] [URL] .

Bagaimana cara POST data tubuh mentah dengan Curl PHP?

Kita bisa melakukan POST mentah dengan pustaka cURL, yang bisa mengirim data teks ke server, seperti json, xml, html dan sebagainya. Cukup konversikan data ke string, dan masukkan curl_setopt($curl, CURLOPT_POSTFIELDS, $data)