• Sunday , 20 August 2017

PHP cURL Tutorial and Example

Code Canyon



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.

Original source

3d Ocean

Related Posts

22 Comments

  1. Miguel Nogueira
    July 13, 2017 at 02:38

    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.

  2. FlashFire Gaming
    July 13, 2017 at 02:38

    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?

  3. Shafiq Patel
    July 13, 2017 at 02:38

    worst tutorial ever

  4. Fizz Hasif
    July 13, 2017 at 02:38

    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.

  5. Arjelyn N
    July 13, 2017 at 02:38

    Thank you!

  6. Ahadul Islam
    July 13, 2017 at 02:38

    Nice Tutorial man.

  7. norcal johnny
    July 13, 2017 at 02:38

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

  8. Alex Vitkov
    July 13, 2017 at 02:38

    so in the end it really wasnt as scary as i thought

  9. shiben dutta
    July 13, 2017 at 02:38

    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:

    <?php
    // create curl resource
    $ch = curl_init();

    // set url
    curl_setopt($ch, CURLOPT_URL, "http://some_api.aspx?username=" . $_POST['username'] . "&password=" . $_POST['password']);

    //return the transfer as a string
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    // $output contains the output string
    $output = curl_exec($ch);

    // close curl resource to free up system resources
    curl_close($ch);
    ?>

    I am still unable to make the user login
    I always get a failure error message (from the API) anything wrong with the code ?

  10. Yattsu
    July 13, 2017 at 02:38

    That actually cleared up a lot of things. Thanks

  11. Clever Techie
    July 13, 2017 at 02:38

    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!

  12. Somyaranjan Das
    July 13, 2017 at 02:38

    why i use curl?

  13. walyomu brian
    July 13, 2017 at 02:38

    so interesting

  14. Rahul Agarwal
    July 13, 2017 at 02:38

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

  15. SonicFanFilmEspaňol 100
    July 13, 2017 at 02:38

    hello,awesome video

  16. Aminu Kabunu
    July 13, 2017 at 02:38

    hello. john please make a video for session and cookie

  17. Aminu Kabunu
    July 13, 2017 at 02:38

    wonderful vider

  18. paihz
    July 13, 2017 at 02:38

    btw,looking forward you make a video php using guzzlehttp

  19. paihz
    July 13, 2017 at 02:38

    nice tutorial. thank for create this video. appreciate

  20. Rahul Agarwal
    July 13, 2017 at 02:38

    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.

  21. Kim Jong-un
    July 13, 2017 at 02:38

    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

  22. Mbiarrambang Alain
    July 13, 2017 at 02:38

    cool tutorial. I love it

Leave A Comment

You must be logged in to post a comment.