0

so here is the url for curl -> curl 'https://api.xyz.com/v2.1/messages?limit=2&start_date=2021-01-01&end_date=2021-12-12' -u user:pass

When I run this i get some results in the content option. any suggestions on how to display those datas through an array in html page?(php code)

Neo
  • 1
  • 1
  • Does this answer your question? [What is cURL in PHP?](https://stackoverflow.com/questions/3062324/what-is-curl-in-php) – AymDev Aug 31 '21 at 16:03

1 Answers1

1

Can you make the http request directly from PHP? If so, Php Curl or File_get_contents should meet your needs. A simple example might look like:

    $data = json_decode(file_get_contents('https://jsonplaceholder.typicode.com/todos/'));
    print_r($data);
outlaw
  • 197
  • 8