Using REST APIs in a web application | Quick PHP Tutorial




About this tutorial:

Video duration: 9:21
In this video I show you how to create a simple web application which converts a location into latitude and longitude using the Google Maps API. Then it uses those coordinates to pull images taken in that location from the Instagram API.

Final PHP file used in this tutorial:

Example Google Maps API call:

Example Instagram API call using Disneyland’s coordinates:

Chrome…

Post Author: OfficeTutes.com

Apple lover, ICT and LEAN consultant, MS Office lecturer My other website with video tutorials - Tutorials, guides and news for iPhones and iPads

48 thoughts on “Using REST APIs in a web application | Quick PHP Tutorial

    James B

    (December 7, 2018 - 4:24 pm)

    I don't care about instagrams api but that files_get_content function made me click thumbs up. cause I didn't know about that func

    Rodrigo S

    (December 7, 2018 - 4:24 pm)

    how could be with user and password ?

    Timothy Musson

    (December 7, 2018 - 4:24 pm)

    PERFECT tutorial!!!

    Chris Swafford

    (December 7, 2018 - 4:24 pm)

    You. Rock.

    Carlos Segura

    (December 7, 2018 - 4:24 pm)

    PHP 🤖

    ZEE IBIT

    (December 7, 2018 - 4:24 pm)

    1) MAKE MORE VIDEOS
    2) TALK SLOWER
    Subscribed! bye!

    hiren vaishnav

    (December 7, 2018 - 4:24 pm)

    you are master
    i have one question
    how to httprequest to api for registration form using php and login using same token
    can you help me ?
    i am using postmen

    Web Dev

    (December 7, 2018 - 4:24 pm)

    Cool tutorial. Thanks.

    /

    (December 7, 2018 - 4:24 pm)

    great production quality. one of if not the best production quality ive seen in a programming tutorial

    Bolerophon

    (December 7, 2018 - 4:24 pm)

    Still too difficult and cumbersome, you need to know HTML & PHP. I don't get why we can't just have a system where user can just point input field to an api call and select what output you want to receive from that api: input = location ; output = image based on location. It would be great if you could stitch that together like how IFTTT works.

    MUJAHID BHORANIYA

    (December 7, 2018 - 4:24 pm)

    Nice understanding . I like your video. Really very simple explanation for you.

    Alan Agon

    (December 7, 2018 - 4:24 pm)

    Dude. You are awesome. Not faff, just info. Subbed.

    Manda Putra

    (December 7, 2018 - 4:24 pm)

    Okay now im fully understand
    THAAANKS

    Beatrix Ducz

    (December 7, 2018 - 4:24 pm)

    This doesn't work anymore. But I understand the point. 🙂

    Moh Aarif Ahmed

    (December 7, 2018 - 4:24 pm)

    i used same code but I am getting error
    {"meta": {"code": 400, "error_type": "OAuthAccessTokenException", "error_message": "The access_token provided is invalid."}}

    Chris Manuel

    (December 7, 2018 - 4:24 pm)

    you fucking speek to quick ramon

    Leticia Lima Cavalcanti

    (December 7, 2018 - 4:24 pm)

    English is not my first language and I understand only 50% of what you said, that is, you speak very fast!

    mxrider772

    (December 7, 2018 - 4:24 pm)

    Heads up, currently this tutorial will not 100% work as instagram has locked down their api's. You cannot access public data without approval from instagram, which they won't give out unless you have a real use (not just demoing). Even with a real client_id or access_token the scope will not have public data which will cause this to fail to get anything from instagram.

    Truman Gregg

    (December 7, 2018 - 4:24 pm)

    I am confused that yo u never mentioned api access tokens in this video. Do you need access tokens for the example in this video to work?

    Gary Tsang

    (December 7, 2018 - 4:24 pm)

    Sooooo nice!!! Thank you very much!

    Anip Vin

    (December 7, 2018 - 4:24 pm)

    nice tutorial…can you do a video on api that requires authentication and data encryption

    Angelica Escobar

    (December 7, 2018 - 4:24 pm)

    I have seen some of your videos, and your content is amazing as your speed is… I find it could be better if you slow your speech a bit down. 🙂

    Leo

    (December 7, 2018 - 4:24 pm)

    Hi Ben any plans to do a python based REST API tutorial?

    Liam Thornback

    (December 7, 2018 - 4:24 pm)

    I could not hit that subscribe button fast enough after watching.

    helium73

    (December 7, 2018 - 4:24 pm)

    Yeah nice watching a video on programming right after seeing that some guy's already done it with wix.

    SH WebSoft

    (December 7, 2018 - 4:24 pm)

    Just subscribed to your channel. Became a fan of you!

    Mensur Kosumi

    (December 7, 2018 - 4:24 pm)

    Please slow down a bit, Eminem!

    Aer Dun

    (December 7, 2018 - 4:24 pm)

    Can you do something like that for videos – so you can search instagram for videos only?

    Chelsea T

    (December 7, 2018 - 4:24 pm)

    Thanks so much! You talk fast, but I really appreciate it as I hate wading through slow talking videos wasting time – just pause the vid when needed. You're very clear with your descriptions.

    KUNDAN ROCKS

    (December 7, 2018 - 4:24 pm)

    The video is very useful, but speak slowly

    meir

    (December 7, 2018 - 4:24 pm)

    Great explanation.

    nerf 93

    (December 7, 2018 - 4:24 pm)

    why i need api in my WordPress site?

    Fayol Lalawi

    (December 7, 2018 - 4:24 pm)

    hey there are u not making videos anymore?

    lafouine vino

    (December 7, 2018 - 4:24 pm)

    that's good! very introduction and i get a grest information for exemple rest APIs in a web application

    Mehran Vafaee

    (December 7, 2018 - 4:24 pm)

    Absolutely love the way you put it! Bravo!

    SiNicoleIdolSiSARAH

    (December 7, 2018 - 4:24 pm)

    please shave.

    1g2002541

    (December 7, 2018 - 4:24 pm)

    real awesome video, big Thumb up!

    Bharat Gambhir

    (December 7, 2018 - 4:24 pm)

    It's too fast to learn for a new person..go little slow and explain better

    YouTech Academy

    (December 7, 2018 - 4:24 pm)

    Eminem of coding .

    Leandro Viana

    (December 7, 2018 - 4:24 pm)

    That's the correct way of doing video tutorials: talk faster!

    84Westy

    (December 7, 2018 - 4:24 pm)

    "LANG"??????

    Chris Muga

    (December 7, 2018 - 4:24 pm)

    this was, overall just incredible to watch… thanks.

    TDefton

    (December 7, 2018 - 4:24 pm)

    What about When the API requires a token to be sent using the cURL header? What Should my php look like then?

    skynet software

    (December 7, 2018 - 4:24 pm)

    Warning: file_get_contents(https://api.instagram.com/v1/media/search?lat=26.9124336&lng=75.7872709&client_id=CLIENT-ID): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /Applications/XAMPP/xamppfiles/htdocs/asdf/Pro9.php on line 23

    Mark Hynes

    (December 7, 2018 - 4:24 pm)

    Speaking way too fast, have to keep replaying to listen closely to what was said, difficult to get continuity

    Never Code Alone

    (December 7, 2018 - 4:24 pm)

    Super video – thx for it

    Henry Handoko Samadikun

    (December 7, 2018 - 4:24 pm)

    please help, how call wsdl like this in php:
    <wsdl:portType name="CSX_EPAYMENT_WS_PortType">
    <wsdl:operation name="CSX_EPAYMENT_WS_PAYMENT">
    <wsdl:documentation>E-Payment WebService Payment</wsdl:documentation>
    <wsdl:input message="tns:CSX_EPAYMENT_REQ.V1" name="CSX_EPAYMENT_REQ.V1"/>
    <wsdl:output message="tns:CSX_EPAYMENT_RESP.V1" name="CSX_EPAYMENT_RESP.V1"/></wsdl:operation>

Leave a Reply

Your email address will not be published. Required fields are marked *