curl_init () fonksiyonu çalışmıyor

0 Cevap php

Merhaba PHP Post Request inside a POST Request bana ve benim kod için yararlı olabileceğini düşünerek çalıştığında aşağıda verilmiştir

$sub_req_url = "http://localhost/index1.php";

$ch = curl_init($sub_req_url);
$encoded = '';

// include GET as well as POST variables; your needs may vary.
foreach($_GET as $name => $value) {
  $encoded .= urlencode($name).'='.urlencode($value).'&';
}

foreach($_POST as $name => $value) {
  $encoded .= urlencode($name).'='.urlencode($value).'&';
}

// chop off last ampersand
$encoded = substr($encoded, 0, strlen($encoded)-1);

curl_setopt($ch, CURLOPT_POSTFIELDS,  $encoded);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_exec($ch);
curl_close($ch);

index.php dosyası ve index2.php oluşturan aynı dizinde başka bir dosya ve i sayfasını açtığınızda benim error.log dosyasında aşağıdaki hatayı alıyorum

[Sat Dec 18 15:24:53 2010] [error] [client ::1] PHP Fatal error:  Call to undefined function curl_init() in /var/www/testing1/index.php on line 5

Ben ne yapmak istiyorum ben sonrası değerleri işlemek istiyorum ve isteği göndermek tekrar göndermek, sonra yazılan isteği göndermek ve rezervasyon formu var olduğunu paypal için

0 Cevap