Кто нить подскажет...

Discussion in 'Болталка' started by Bpeguha, 27 Sep 2009.

  1. Bpeguha

    Bpeguha Elder - Старейшина

    Joined:
    30 Aug 2008
    Messages:
    0
    Likes Received:
    17
    Reputations:
    1
    Кто нить подскажет,что в первой строчке не правильно ? денвер ошибку выдает.Заранее спасибо.

    { $cl = curl_init();
    curl_setopt($cl, CURLOPT_URL, $url);
    curl_setopt($cl, CURLOPT_HEADER, 1);
    curl_setopt($cl, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($cl, CURLOPT_TIMEOUT, 15);
    curl_setopt($cl, CURLOPT_USERAGENT, 'Opera/9.25 (Windows NT 5.1; U; ru)');
    //curl_setopt($cl, CURLOPT_COOKIEJAR, $_SERVER['DOCUMENT_ROOT'].'/cookie.txt');
    //curl_setopt($cl, CURLOPT_COOKIEFILE, $_SERVER['DOCUMENT_ROOT'].'/cookie.txt');
    if (!empty($post)) {curl_setopt($cl, CURLOPT_POST, 1);curl_setopt($cl, CURLOPT_POSTFIELDS, $post);} else {curl_setopt($cl, CURLOPT_POST, 0);}
    if (!empty($referer)) curl_setopt($cl, CURLOPT_REFERER, $referer);
    $ex=curl_exec($cl);
    curl_close($cl); return $ex;
    }
     
  2. Ctacok

    Ctacok Banned

    Joined:
    19 Dec 2008
    Messages:
    732
    Likes Received:
    646
    Reputations:
    251
    $cl = curl_init(Адрес);
     
  3. nitx

    nitx Elder - Старейшина

    Joined:
    4 Jan 2008
    Messages:
    214
    Likes Received:
    31
    Reputations:
    10
    это пхп? мб нужно не { & } юзать а <?php ?>, так?
     
  4. Bpeguha

    Bpeguha Elder - Старейшина

    Joined:
    30 Aug 2008
    Messages:
    0
    Likes Received:
    17
    Reputations:
    1
    Разобрался уже,спасибо.Тему клоуз
     
  5. Ctacok

    Ctacok Banned

    Joined:
    19 Dec 2008
    Messages:
    732
    Likes Received:
    646
    Reputations:
    251
    думай что говоришь.
    Это кусок кода.