How to use PHP cURL to Handle JSON API Requests

preview_player
Показать описание
Learn the basics of handling API requests in PHP using cURL. The video covers:

- interacting with an external API usingGET, POST, PUT, PATCH, DELETE requests
- sending post data with the request
- setting HTTP headers
- decoding and encoding JSON data
- writing the response to a file

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

I have been searching for days for a tutorial like this. Thank you so much. Very precise and useful for someone with basic curl knowledge. Thanks.

akhtarhossain
Автор

Very precise and useful for someone with basic curl knowledge. Thanks.

betotrader
Автор

Thank you for your very detailed instructions. I have a question. I want to build a search form when I enter keywords into that form and press the search button it will call to another website and then I also want to use code to perform operations like searching for something in the form of that website instead of having to go to that website to enter it manually, then also use the code to automatically click the search button (submit button) in that website (if any) and then get that search results return to my localhost website. How can I do this?

duyphi
Автор

Best Video I have seen on cURL, I can't wait for more

rodgerspenda
Автор

Everybody is showing how to send request. I want to know how to handle a request and send back a response.

_soundwave_
Автор

very well made and very clear tutorial! thank you so much! Love the reqres.in usage and introduction. <3 - with love from malaysia. Andrew

BeyondPhotography
Автор

I have been searching for days for a tutorial like this. Thank you so much.

william
Автор

After curl then insert same data into MySQL database, need solution for this sir

yaswanthkumar
Автор

do you know how to then display the different objects in the array? Like the name in an <h3> tag, bio in a <p>, image in an <img> tag?

LatinoWebStudio
Автор

someone please guide me a little, is it a practical exercise to use this kind of HTTP_REQUEST in production, actually to be clear i am very bad with Javascript frontend framework. I want to use PHP also as on my frontend to fetch data from an API. thanks in advance.

mukhtarhussain
Автор

what if post with parameter request header and request body

muhnandar
Автор

please how i retrieve this data by get and loop on it and make this into table view ?

ahmedtaha-dfcw
Автор

I'm getting this error while trying to get the api to display the data:

Fatal error: Uncaught Error: Call to undefined function curl_init() in Stack trace: #0 {main} thrown in on line 48.

I am using a real api with this.
the rest of my code does not intervein with the curl portion.

any guesses what's wrong?

gideonriesebosch
Автор

Instead of getting data from url can we fetch data from database and can that be printed into the file ....in file handling case?

kanchansadul
Автор

hi I can't find any video to teach how I can use an API via it's manual with PHP
can you show how use an API ?
chose 10 API And use them

karamalinumberone
Автор

if API is restricted then how can we pass username and password to it?

Neo-og
Автор

please do more videos on php. Your content is awesome.

CodingSphere
Автор

great tutorial, thank you for making this tutorial, sir please make tutorial on firebase

poonambharara
Автор

that was very clear and precise. thank you

thatwasepiclips
Автор

Hi . Can you help, what if the url need Api key?

ivanreynalangan