Ian Rehwinkel
Ian Rehwinkel

Reputation: 2615

How can i get the data from an http link in PHP?

I have a link, that when opened in a Browser, shows some information in form of text: https://api.mcuuid.com/v1/profile/ed15e741-8ab9-46c6-b47d-63df173fede2/name Now, I want to use the data, that would be displayed in the Browser on my Website. In the end, I want this to be seen on MY website: { "username": "SpigxtPlugins", "live": false, "age": 573 }

The returned value of the link in the Browser.

Upvotes: 2

Views: 258

Answers (1)

Code Lღver
Code Lღver

Reputation: 15603

You can use the following any method:

  1. file-get-contents function of php and then use json_decode.
  2. Use the curl in php.

Here is the link to know how to decode the json data: json-decode.

Hope the links given here will be helpful to you.

Upvotes: 2

Related Questions