v2.5.2
Giriş yap

cURL ile basit post etme işlemi

fir0
756 defa görüntülendi ve 1 kişi tarafından değerlendirildi

-<?php

$post = "BilgiGirisi=123456789";
$url = "http://onlineislemler.iib.org.tr/asp/Uyeborctahsilatg.Asp&quot;;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_REFERER, "http://www.google.com/&quot;);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$sonuc = curl_exec ($ch);
curl_close ($ch);
print_r($sonuc);

?>-

Basit bir şekilde verilen input'a değer girdirip, dönen sonucu almak istiyorum ama sanırım başarılı olamadım yardımcı olursanız sevinirim..

Cevap yaz
Cevaplar (2)
recepkaramanli61
1404 gün önce

şunlarıda deneyebilirsin,

curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 0);

recepkaramanli61
1404 gün önce

şu iki satırıda ekleyip denermisin.

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);