How to use a REST API from PHP using cURL | Full PHP cURL API tutorial

preview_player
Показать описание
Learn how to use a REST API from PHP using cURL.

You'll learn the following:
- The basics of making API requests in PHP
- Encode and decode JSON data
- Send request headers
- Use different request methods (GET, POST, PATCH, DELETE etc.)
- Respond to different HTTP status codes

Code shown in the video:

Resources shown in the video:

00:00 Introduction
00:21 PHP cURL basics
01:42 Add request headers
04:14 Get a string response
05:11 Decode JSON
09:26 Endpoints with IDs
12:35 Setting endpoints
14:33 Multiple cURL options
18:38 POST requests
20:59 HTTP status code
26:57 PATCH requests
28:26 DELETE requests
30:37 Outro

#PHP #API #cURL
Рекомендации по теме
Комментарии
Автор

You sir, display such a clean and proper way of teaching. It is such a relief to find videos with these topics on Youtube that are spoken in proper English.

Although I respect every individual that commits his/her time to produce free educational content, I am quite disappointed by the utter polution that exists on Youtube nowadays. I am speaking of all the educational videos that seem to be produced with the proper use of the English language at first (e.g. English title, English thumbnail, English useraccount, English description) but once started only lead to disappointment because the speaker is someone who barely speaks understandable English.

I say this with a certain level of understanding yet quite the amount of resent because it makes my personal user experience on Youtube worse than it was before.

Long story short, Dave Hollingworth, you are a godsend and I thank you for your videos!

johnnyvandenelzen
Автор

been struggling for days to just create a simple cURL POST api client, thankyou so much this has been the MOST informative breakdown of doing just that.

and unlike most other online resources, you dont write the code line by line, you build the app as it should be built. Amazing work

rshelfo
Автор

This gives such clear descriptions and full explanations of what you are doing and why at every step. Wonderful content. Thank you!

tonyhomfray
Автор

Your tutorials are best, Dave!
Keep up the good work!

ilyamur
Автор

Your video tutorial is one of the best out there. Thank you for walking through and explaining the process in a slow, understandable method. I'm a subscriber!

lexiriam
Автор

Enjoyed your video. I'm trying to get back into PHP after a very long hiatus (PHP 4) . Thanks for your videos for seeing what's new under the sun.

chadmasters
Автор

Clear, concise, spot on!, , , , thank you very much for passing it on..

BoneyardHauntedHouse
Автор

great tutorial, Dave! Was just googling for this earlier today, and you posted this tonight! Cheers

novakjetil
Автор

Hello Sir, Thank you so much for the tutorials such a clear and steady voice to follow and learn things. I ever seen such a tutorial before. very useful👏👏👏👍👍👍

qsbedpi
Автор

Thank you!! such a neat & clean tutorial.

SLCODEGEN
Автор

Thank you for this explanation. This helped me so much.

michellemartinez-vcmj
Автор

Wow this was really great iam happy i found you, you just gained a new w in the chat

divineembassychildrenschoi
Автор

Amazing tutorial Dave.. very well explained..

piyushakoliya
Автор

Easy to understand, Love it, Thank you Dave. 👍

bugsbunny
Автор

Just what I was looking for! Thanks a lot.

athithyaparamesh
Автор

Hi Dave, great video, thank you. was trying to show other details for the repository like the files. any hints would be appreciated. thanks

mazs
Автор

thanks for your effort this is helpful

themonster
Автор

thanks for this tutorial it's super useful keep it up

mullertm
Автор

dave bro, u are just awesome. u will be great in future. remember. <3 from me

SkLzaGaming
Автор

Very good video, keep on the good work :)

Iconic-scenes