https://www.studentstutorial.com/php/php-crud
https://drive.google.com/file/d/14579xTbSKyI3ZSJHfMSRSPBwpN8oJooC/view?usp=sharing
https://www.studentstutorial.com/php/php-crud
https://drive.google.com/file/d/14579xTbSKyI3ZSJHfMSRSPBwpN8oJooC/view?usp=sharing
require google/cloud-speech
https://cloud.google.com/speech-to-text/docs/quickstart-client-libraries#client-libraries-install-php
$url
) where the JSON data need to be sent.application/json
using the CURLOPT_HTTPHEADER option.// API URL
$url = 'http://www.example.com/api';
// Create a new cURL resource
$ch = curl_init($url);
// Setup request to send json via POST
$data = array(
'username' => 'codexworld',
'password' => '123456'
);
$payload = json_encode(array("user" => $data));
// Attach encoded JSON string to the POST fields
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
// Set the content type to application/json
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
// Return response instead of outputting
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute the POST request
$result = curl_exec($ch);
// Close cURL resource
curl_close($ch);
The following example shows how you can get or fetch the JSON POST data using PHP.
$data = json_decode(file_get_contents('php://input'), true);