Results 1 to 2 of 2

Thread: Php Curl Function

  1. #1
    Join Date
    Oct 2011
    Posts
    11

    Default Php Curl Function

    Php Curl Function

    <?php
    function get_data ($url)
    {
    $ch = curl_init ();
    $timeout = 5;
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_HEADER, true);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $data = curl_exec ($ch);
    curl_close ($ch);
    return $data;
    }
    ?>

  2. #2
    Join Date
    Jan 2012
    Posts
    5

    Default

    thx for this help me verry much

Bookmarks

Posting Permissions

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