curl_setopt($ch, CURLOPT_POSTFIELDS, "kullanici=By_system&sifre=123456&ahmet=mehmet "); aynen bunu yazdım ama yine giriş kısmında kalıyor malesef..
<Form Name="form1" method="POST">
<b>Kullanıcı Adı</b>
<input type="text" name="kullanici" size="20" MaxLength="20" taborder="0">
<b>Şifre</b>
<input type="password" name="sifre" size="20" MaxLength="20" taborder="1">
<a href="javascript: Giris();">
<img border="0" src="login.gif" style="cursor:hand"></a>
</form>
function Giris() {
document.form1.action='www.site.com/login.php';
document.form1.submit()
}form ve javascript fonksiyonu böyle
--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 00:32:54 -->-> Daha önceki mesaj 00:29:51 --
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.
Dediğiniz şeyler olabilir evet sorun yok ama demek istediğim o curl ile site.com'a bağlanıyor ya form orada işte orayı geçemiyorum ben?
Ayrıca acaba yanlış bi şey mi söylüyorum diye düşünmeye de başladım