Answers for "how to fetch from api in php"

PHP
3

php get data from api

$api_url = 'http://dummy.restapiexample.com/api/v1/employees';

// Read JSON file
$json_data = file_get_contents($api_url);

// Decode JSON data into PHP array
$response_data = json_decode($json_data);

// Print data if need to debug
//print_r($user_data);
Posted by: Guest on June-14-2021
0

fetch body show in php code

$entityBody = stream_get_contents(STDIN);
Posted by: Guest on June-27-2020

Browse Popular Code Answers by Language