Save cURL output to string

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Save cURL output to string

    You can save the cURL output as a string for further manipulation.

    Following code takes care of:


    PHP Code:


    <?php
    // create curl resource
    $ch curl_init();
    // set url
    curl_setopt($chCURLOPT_URL"http://example.com");
    // return the transfer as a string
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
    // save output to string
    $output curl_exec($ch);
    // close curl resource to free up system resources
    curl_close($ch);
    ?>
    USE THE THANKS BUTTON IF YOU LIKE THIS
    ------------------------------
    Comming Soon:

    WWW.BIOBEO.COM
    Bangladesh Internet On Best Economic Organizations (B I O B E O)
    Last edited by BioBeo; 06.11.10, 16:13.
Working...
X