Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2009
    Posts
    351
    Thanks
    75
    Thanked 0 Times in 0 Posts

    curl help please

    can anybody explain the following lines of code please. im new to curl and desperately trying to learn it

    PHP Code:
    curl_setopt($curl_handleCURLOPT_HEADER0);
    //curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($curl_handleCURLOPT_SSL_VERIFYPEERfalse);
    curl_setopt($curl_handleCURLOPT_CAPATHSSL_CA_FILE);
    curl_setopt($curl_handleCURLOPT_COOKIEJARCOOKIE_FILE);
    curl_setopt($curl_handleCURLOPT_COOKIEFILECOOKIE_FILE);
    curl_setopt($curl_handleCURLOPT_RETURNTRANSFER1);
    curl_setopt($curl_handleCURLOPT_USERAGENT"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");

    //login to initialize cookies
    curl_setopt($curl_handleCURLOPT_URL'https://login.facebook.com/login.php');
    curl_setopt($curl_handleCURLOPT_POST1);
    curl_setopt($curl_handleCURLOPT_POSTFIELDS$qryString);
    $page curl_exec($curl_handle);

    sleep(1);
    unset(
    $logInPage);

    curl_setopt($curl_handleCURLOPT_URL'https://login.facebook.com/login.php');
    curl_setopt($curl_handleCURLOPT_POST1);
    curl_setopt($curl_handleCURLOPT_POSTFIELDS$qryString);
    $page curl_exec($curl_handle);

    unset(
    $qryString);

    // get home page
    curl_setopt($curl_handleCURLOPT_POST0);
    curl_setopt($curl_handleCURLOPT_URL'http://www.facebook.com/home.php');
    $page curl_exec($curl_handle); 

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Which part is confusing you? Have you read the documentation?

    http://us.php.net/manual/en/function.curl-setopt.php
    http://us.php.net/manual/en/function.curl-exec.php

    Let us know specifically where you're getting lost.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •