curl_setopt($ch, CURLOPT_POSTFIELDS, "kullanici=By_system&sifre=123456");
verileri sen gönderiyorsun zaten bi post tagının olmasına gerek yokki buraya senne yazarsan o gir ahmet=mehmet yaz oda gitsin
--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 00:19:48 -->-> Daha önceki mesaj 00:18:01 --
<html>
<head>
/*Jquery tanımlamalarını yaptığını varsayiyorum*/
<script type="text/javascript">
var serial = $("#kullaniciform").serialize(); //formdaki butun verileri alir
$.ajax({
type:"POST",
url:"curlpost.php",
data:serial,
success:function(gelen){
alert(gelen);
}
});
</script>
</head>
<body>
<form id="kullaniciform" method="post" action="javascript:;">
<input type="text" name="kullanici" />
<input type="text" name="sifre" />
<input type="button" value="git ve al" onclick="gitalgel()" />
</form>
</body>
</html>curlpost.php için
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "site.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://google.com");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "kullanici=".$_POST[kullanici]."&sifre=".$_POS[sifre]);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
$data = curl_exec($ch);
curl_close($ch);
echo $data;
?>ama eğer istedigin formdaki verileri js ile gondermek ise böylede yapabilirsin.