Arkadaşlar bununla ilgili birçok kod varda ben aradığımı bulamıyorum.
bir sayfadaki input name=1 olan form a veri gönderip verdiği sonucu çekmek istiyorum?
Teşekkürler
Curl ile form a post ettirme
3
●457
- 25-03-2017, 21:25:06
$url = ""; // Post edilecek url $post_veri = array( 'username' => "Berk" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$post_veri); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT,$_SERVER["HTTP_USER_AGENT"]); $veri = curl_exec($ch); preg_match("/Başarıyla kayıt oldunuz\. Yönlendiriliyorsunuz\./",$veri,$sonuc); // $sonuc ile cevabı alabilirsin. curl_close ($ch);