简体   繁体   中英

PHP HTTP request to get JSON response

I am a novice in PHP. I have a URL and I need generate a GET request to this URL and get a JSON response. How might I achieve this?

You can perform GET requests using the following. . . provided PHP is not in safe mode.

file_get_contents();

curl();

您可以使用http://php.net/curl库发送GET请求。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM