siteadi.com/post?dolar=$dolar&avro=$avro
$dolar = $_POST["dolar"];
$avro = $_POST["avro"];
?>
php ile nasıl post attırabilirim ? |
5 Mesajlar | 1.162 Okunma |
$oturum=curl_init();
curl_setopt($oturum,CURLOPT_URL,”http://www.orneksite.com/login.php”);
curl_setopt($oturum,CURLOPT_POST,1);
curl_setopt($oturum,CURLOPT_POSTFIELDS,”username=salihulukoylu&password=123456&login=GirisYap”);
$cikti = curl_exec($oturum);
curl_close($oturum);
salihulukoylu adlı üyeden alıntı
Php curl kullanarak verileri post edebilirsin.$oturum=curl_init();
curl_setopt($oturum,CURLOPT_URL,”http://www.orneksite.com/login.php”);
curl_setopt($oturum,CURLOPT_POST,1);
curl_setopt($oturum,CURLOPT_POSTFIELDS,”username=salihulukoylu&password=123456&login=GirisYap”);
$cikti = curl_exec($oturum);
curl_close($oturum);
$dolar = $_POST["dolar"]
$avro = $_POST["avro"]
$c_url = "http://siteadi.com/index.php?$dolar&$avro";
$curl = curl_init($c_url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, "");
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$json_response = curl_exec($curl);
$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if($http_status == 204) echo "http://siteadi.com/index.php?50&100";
?>
siteadi.com/?dolar=$dolar&avro=$avro
$dolar = $_GET["dolar"];
$avro = $_GET["avro"];
?>
$dolar = $_POST["dolar"];
$avro = $_POST["avro"];
?>