课程: Level Up: PHP
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Retrieve and display data from a provided REST API
- Back in the late nineties the way to make websites work together was by linking them. But today there are much more powerful ways integrations, automations, and open data. All of this information is available through APIs commonly REST APIs and send JSON back. With PHP we can quickly get JSON information back from an API and convert it to a usable array. And that's exactly what you'll do for this challenge. The fantastic xkcd has a completely open JSON API at xkcd.com/json.html. It provides two links, one for the latest comic and one where you pass a comic number to it and it returns that specific comic. You're going to build a page that displays a randomly selected xkcd comic. Here are the requirements. Use the provided xkcd API linked on the screen here. Get the total number of comics, randomly generate a number from one to the total number of comics and make an API call to that specific comic. Then print the title…
内容
-
-
-
Event capacity: Compare two numbers3 分钟 18 秒
-
(已锁定)
Flip a coin2 分钟 40 秒
-
(已锁定)
Fizz buzz3 分钟 53 秒
-
(已锁定)
Given a birth date, determine age3 分钟 54 秒
-
(已锁定)
Determine who's older: Comparing objects4 分钟 13 秒
-
(已锁定)
Sort people by age: Sorting an array of objects5 分钟 35 秒
-
(已锁定)
Extend a class6 分钟 17 秒
-
(已锁定)
Determine a palindrome5 分钟 14 秒
-
(已锁定)
Process a simple contact form4 分钟 15 秒
-
(已锁定)
Store and retrieve data from a cookie4 分钟 24 秒
-
(已锁定)
Send an email6 分钟 8 秒
-
(已锁定)
Create functions in a namespace5 分钟 7 秒
-
(已锁定)
Build a calculator form5 分钟 17 秒
-
(已锁定)
Write a number guessing game7 分钟 38 秒
-
(已锁定)
Retrieve and display data from a provided REST API6 分钟 52 秒
-
(已锁定)
The Dutch national flag problem4 分钟 13 秒
-
(已锁定)
Create a Singleton design pattern4 分钟 10 秒
-
(已锁定)
Encrypt then decrypt a string6 分钟 32 秒
-
(已锁定)
Write a login form8 分钟 7 秒
-