PHP cURL Tutorial and Example

Sdílet
Vložit
  • čas přidán 8. 09. 2024
  • A simple PHP cURL tutorial and example. Learn how to use curl_init, curl_setopt, and curl_execute. Also learn how to POST data to a remote URL using cURL.
    Enroll in my free PHP course here:
    www.johnmorriso...
    Support the show on Patreon:
    www.johnmorriso...
    Enroll in PHP 101 here:
    www.johnmorriso...
    Join the Top 3% of Developers On TopTal:
    www.johnmorriso...
    Subscribe on CZcams:
    / johnmorrisonline
    Subscribe to the Podcast on Google Play Music:
    johnmorrisonli...
    Subscribe to the Podcast on iTunes:
    goo.gl/RggnXW
    ~-~~-~~~-~~-~
    Please watch: "Ryan Carson: How to Get an IT Job WITHOUT a College Degree"
    • Ryan Carson: How to Ge...
    ~-~~-~~~-~~-~
    #php #webdev

Komentáře • 54

  • @miguelnogueira8180
    @miguelnogueira8180 Před 7 lety

    Wow, I thought cURL was the hardest thing in the world but now I can use it easily... Easy peasy! Ty for taking my PHP skills further.

  • @m.sulemankhan3992
    @m.sulemankhan3992 Před 4 lety

    Thanks

  • @gavinmiles1126
    @gavinmiles1126 Před 6 lety

    Very straightforward and easy to follow, thank you.

  • @yattsu8660
    @yattsu8660 Před 7 lety

    That actually cleared up a lot of things. Thanks

  • @johnarthur8564
    @johnarthur8564 Před 4 lety

    Thanks for this video bro.

  • @clevertechie
    @clevertechie Před 7 lety

    Great video John and nice channel, you're my role model. I'm trying to get my channel off the ground by focusing on PHP for now, just uploaded a video on cURL too.
    Congrats on your sub count, keep up the great job!

  • @kasramy8845
    @kasramy8845 Před 6 lety

    Great tutorial! Thank you John!

  • @norcaljohnny
    @norcaljohnny Před 7 lety +2

    Helpful tutorial. Is there a link for this lessons code example?

  • @cixtianrush2631
    @cixtianrush2631 Před 6 lety

    John, Brother... this is invaluable!!! I love it!!!!

  • @HonorLone
    @HonorLone Před 6 lety

    thanks for the very nice explanation

  • @arjelynnebalasca6316
    @arjelynnebalasca6316 Před 7 lety

    Thank you!

  • @bryandelacruz9066
    @bryandelacruz9066 Před 5 lety +1

    Thank you so much for this tutorial man, but do yo also have the edit and delete code for this? :)

  • @ahadulislam8891
    @ahadulislam8891 Před 7 lety

    Nice Tutorial man.

  • @darkmift
    @darkmift Před 6 lety

    very good tutorial

  • @bryandelacruz9066
    @bryandelacruz9066 Před 4 lety

    Hi do you have a sample code with a form fields?

  • @sonicfanfilmespanol1006

    hello,awesome video

  • @Rs3Audi
    @Rs3Audi Před 8 lety

    nice tutorial. thank for create this video. appreciate

  • @rahulagarwal968
    @rahulagarwal968 Před 8 lety

    Hello John , can you please tell me how to add " Refer and earn" feature in a website using php mysql ?

  • @walyomubrian8162
    @walyomubrian8162 Před 8 lety

    so interesting

  • @aminukabunu5318
    @aminukabunu5318 Před 8 lety

    hello. john please make a video for session and cookie

  • @aminukabunu5318
    @aminukabunu5318 Před 8 lety

    wonderful vider

  • @ffgflash1443
    @ffgflash1443 Před 7 lety

    Hi I know that this is an old video and I don't expect a response, but I'm running a Win10 Desktop and in my php.ini I have enabled the cURL extension, but when I do curl_init(); I get and error saying undefined function. Any suggestions to get cURL working?

  • @chriscustomcuts6246
    @chriscustomcuts6246 Před 6 lety

    How do you update cURL to a higher version?

  • @OviedoSaul
    @OviedoSaul Před 7 lety

    Nice, really helpful. Thank you!

  • @vahida6146
    @vahida6146 Před 6 lety

    Hello and thanks for your tutorial , I want to know how i can send the data from first curl request you did from google directly to another page using a new curl again.

    • @john.morris
      @john.morris  Před 6 lety

      Just make a new cURL call and use POST.

    • @vahida6146
      @vahida6146 Před 6 lety

      Thanks, so we don't need to wait for first call to finish ?

    • @john.morris
      @john.morris  Před 6 lety

      Well yeah, you do. PHP processes synchronously.

  • @Rs3Audi
    @Rs3Audi Před 8 lety

    btw,looking forward you make a video php using guzzlehttp

    • @john.morris
      @john.morris  Před 8 lety

      I'll look into it

    • @kemdem876
      @kemdem876 Před 5 lety

      @@john.morris Hey, have you looked into it? would really appreciate a Guzzle video

  • @deenyaduwanshi2688
    @deenyaduwanshi2688 Před 5 lety

    Dear sir while I am accessing my website I am getting this error
    Unable to load remote URL using PHP CURL. See if CURL is disabled or Port is blocked
    Please tell me how I can solve it
    In codeigniter

  • @rahulagarwal968
    @rahulagarwal968 Před 8 lety

    Hello .... I have recently came across the word "nginex" . So please tell me Which is better Apache or ngineX ?? And one request is that if possible please make a video on how to reduce load time or increase performance of a webapp.

  • @KimYoungUn69
    @KimYoungUn69 Před 8 lety

    can you please please please make a tutorial where you do file handeling like uploading images and restrict images extensions and give them a link to download again etc please i would love that

    • @john.morris
      @john.morris  Před 8 lety

      +deZwaffelaarNL well I have one... but it's reserved for my premium PHP course. Covers exactly what you asked for.

    • @KimYoungUn69
      @KimYoungUn69 Před 8 lety

      ah okey sorry for asking then

    • @curtturdle5661
      @curtturdle5661 Před 7 lety

      +John Morris
      just wondering, how current is the premium course?

    • @john.morris
      @john.morris  Před 7 lety

      +Curt Turdle It's current for PHP7

  • @thembocharleslwanga8990

    You just Saved my Ass

  • @somyaranjandas4599
    @somyaranjandas4599 Před 8 lety

    why i use curl?

  • @FizzHasif
    @FizzHasif Před 7 lety +3

    Liked your video but there's actually no link that I've found which has the source codes you were using to get started easily. If you're just marketing to enroll then it just hurtful for inexperienced programmers.

  • @MrShivtu
    @MrShivtu Před 7 lety

    Hi, I am trying to make users log in using an API
    I am using curl method to send username and password to the API
    here it is:
    I am still unable to make the user login
    I always get a failure error message (from the API) anything wrong with the code ?

  • @varenneriocha8712
    @varenneriocha8712 Před 2 lety

    I wish, I watched this video before trying to modify a "template" script to my requirements.

    • @john.morris
      @john.morris  Před 2 lety

      Always helpful to get to the root of how something works

  • @danieldixon5944
    @danieldixon5944 Před 6 lety

    Can you teach me how to download a csv file that prompts the user to save file. Can curl using this link: molottery.com//gameHistory.do?method=mmPrintout&order=desc I am using Linux and need to do this from command line. I tried to do this with Curl, but could not get it to work. Also can curl deal with user prompts that the site requests?

  • @shafiq9228
    @shafiq9228 Před 7 lety

    worst tutorial ever

    • @john.morris
      @john.morris  Před 7 lety +7

      +Shafiq Patel I don't know I saw this one once... it was pretty terrible. No talking. Words on the screen. It was bad. Oh and yo mama