How to use PHP cURL to Handle JSON API Requests

  Рет қаралды 120,363

Coding Reflections

Coding Reflections

Күн бұрын

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
see blog: www.coralnodes...

Пікірлер: 50
@akhtarhossain8025
@akhtarhossain8025 4 ай бұрын
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.
@rodgerspenda3207
@rodgerspenda3207 3 жыл бұрын
Best Video I have seen on cURL, I can't wait for more
@betotrader5395
@betotrader5395 4 жыл бұрын
Very precise and useful for someone with basic curl knowledge. Thanks.
@CodingReflections
@CodingReflections 4 жыл бұрын
Glad it was helpful!
@william254
@william254 3 жыл бұрын
I have been searching for days for a tutorial like this. Thank you so much.
@BeyondPhotography
@BeyondPhotography 3 жыл бұрын
very well made and very clear tutorial! thank you so much! Love the reqres.in usage and introduction.
@duyphi5035
@duyphi5035 Жыл бұрын
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?
@_soundwave_
@_soundwave_ Жыл бұрын
Everybody is showing how to send request. I want to know how to handle a request and send back a response.
@LatinoWebStudio
@LatinoWebStudio 3 жыл бұрын
do you know how to then display the different objects in the array? Like the name in an tag, bio in a , image in an tag?
@loredana828
@loredana828 3 жыл бұрын
Did you find out? I need that too and can'ŧ seem to find any tutorial
@shahsajeeth851
@shahsajeeth851 3 жыл бұрын
Do u get that
@thatwasepiclips
@thatwasepiclips 2 жыл бұрын
that was very clear and precise. thank you
@CodingSphere
@CodingSphere 2 жыл бұрын
please do more videos on php. Your content is awesome.
@tech-jeweler
@tech-jeweler 3 жыл бұрын
thank you. Excellent demonstrated.
@poonambharara9068
@poonambharara9068 10 ай бұрын
great tutorial, thank you for making this tutorial, sir please make tutorial on firebase
@yaswanthkumar512
@yaswanthkumar512 3 жыл бұрын
After curl then insert same data into MySQL database, need solution for this sir
@akhilatk4397
@akhilatk4397 3 жыл бұрын
Demonstration is very good...
@kike_estilo_libre
@kike_estilo_libre 3 жыл бұрын
Just what I need. Thanks!
@einarnonbinary4424
@einarnonbinary4424 2 жыл бұрын
You're great! Thank u a lot for the info, i'm just suscribed into your channel!!!!!!
@ishanb5786
@ishanb5786 3 жыл бұрын
Thanks Man , Helped me a lot :)
@saskysamonte
@saskysamonte 3 жыл бұрын
Thank you! This is very helpful
@balakumarprabakaran
@balakumarprabakaran 2 жыл бұрын
Really Easy to learn....👍👍
@muhnandar2342
@muhnandar2342 9 ай бұрын
what if post with parameter request header and request body
@AkashDeep-ux1ig
@AkashDeep-ux1ig Жыл бұрын
Amazing vdo thank you so much
@javedapple1
@javedapple1 3 жыл бұрын
Very Useful Video.
@jeevanandroid8674
@jeevanandroid8674 2 жыл бұрын
Thanks for the video
@ahmedtaha-df1cw
@ahmedtaha-df1cw 3 жыл бұрын
please how i retrieve this data by get and loop on it and make this into table view ?
@mukhtarhussain8954
@mukhtarhussain8954 Жыл бұрын
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.
@muradbabayev6389
@muradbabayev6389 3 жыл бұрын
Thank u bro. I subscribed you channel
@kanchansadul2162
@kanchansadul2162 Жыл бұрын
Instead of getting data from url can we fetch data from database and can that be printed into the file ....in file handling case?
@CodingReflections
@CodingReflections Жыл бұрын
Do you mean a remotely hosted database, or a database on the same machine?
@gideonriesebosch2728
@gideonriesebosch2728 2 жыл бұрын
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 C:\Users\MyUsername\PhpDestination\AppMap\App.php:48 Stack trace: #0 {main} thrown in C:\Users\MyUsername\PhpDestination\AppMap\App.php 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?
@jeevanandroid8674
@jeevanandroid8674 2 жыл бұрын
LibCurl not enabled ?
@jayahandika242
@jayahandika242 Жыл бұрын
Thx mate
@karamalinumberone7478
@karamalinumberone7478 3 жыл бұрын
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
@dlago1352
@dlago1352 3 жыл бұрын
Great video
@andreja107
@andreja107 3 жыл бұрын
Thank you so much
@user-cr9tj9kn7f
@user-cr9tj9kn7f 2 жыл бұрын
thank you bro🥰
@Neo-o2g
@Neo-o2g 2 жыл бұрын
if API is restricted then how can we pass username and password to it?
@honeypots345
@honeypots345 3 жыл бұрын
Thank you 🙂
@sarzo_ir903
@sarzo_ir903 3 жыл бұрын
Hello . please give setup for decode jsone api sites exchange and show price in website with php
@animeshshrivatri9384
@animeshshrivatri9384 3 жыл бұрын
thanks brother
@ivanreynalangan5075
@ivanreynalangan5075 3 жыл бұрын
Hi . Can you help , what if the url need Api key?
@ronukken
@ronukken 3 жыл бұрын
Use Header
@dantulkas
@dantulkas 4 жыл бұрын
Thanks!!
@ismoil3075
@ismoil3075 2 жыл бұрын
noo AGAIN !! DAMN !
@riteshchaudhari133
@riteshchaudhari133 11 ай бұрын
Warning: Array to string conversion in C:\xampp\htdocs\api\curlpost.php on line 24 TrendingCasesCP: ArraydateTime: 2023-10-17 10:37:56 Warning: Array to string conversion in C:\xampp\htdocs\api\curlpost.php on line 24 TotalCasesCP: Array showing this error what to do
@gopalrao7810
@gopalrao7810 2 жыл бұрын
Error i am getting in CURLOPT_RETURENTRANSFER CURLOPT_RETURENTRANSFER for get the data
@mezaitakfarines7262
@mezaitakfarines7262 3 жыл бұрын
curl_getinfo return 407 code why please help me thank you
PHP + curl - A Simple example of how to use cURL
13:43
Joshua Herbison
Рет қаралды 26 М.
SHAPALAQ 6 серия / 3 часть #aminkavitaminka #aminak #aminokka #расулшоу
00:59
Аминка Витаминка
Рет қаралды 332 М.
отомстил?
00:56
История одного вокалиста
Рет қаралды 6 МЛН
PHP cURL API Tutorial - Emailable API Integration - Full PHP 8 Tutorial
17:56
PHP-Send HTTP Get/Post Request and Read JSON response
22:03
jinu jawad m
Рет қаралды 77 М.
How to use a REST API from PHP using cURL | Full PHP cURL API tutorial
31:08
PHP cURL Tutorial - Learn PHP Programming
13:54
Clever Techie
Рет қаралды 155 М.
APIs for Beginners - How to use an API (Full Course / Tutorial)
2:19:33
freeCodeCamp.org
Рет қаралды 4,3 МЛН
PHP REST API From Scratch [1] - Database & Read
32:18
Traversy Media
Рет қаралды 511 М.
Basic cURL Tutorial
14:42
Traversy Media
Рет қаралды 446 М.
How to call APIs from PHP: file_get_contents, cURL, Guzzle and SDKs
25:14
Dave Hollingworth
Рет қаралды 41 М.
SHAPALAQ 6 серия / 3 часть #aminkavitaminka #aminak #aminokka #расулшоу
00:59
Аминка Витаминка
Рет қаралды 332 М.