Caesar' Alıntı:iyi arastirmamissin
PHP:curl_setopt($curl_oturum,CURLOPT_COOKIE,"Cookie_adi=cookie_degeri");
Ceasar şu an giremediği için bunların yazılmasını istedi
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.adres.com/bisi.php");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'dosya.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'dosya.txt');
curl_close($ch);
zamanında böle bişiler yapmışım sanırım cookie alıp dosyaya kaydedip yolluyormuşumPHP:$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.adres.com/bisi.php"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, 'dosya.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, 'dosya.txt'); curl_close($ch);
<?
// Curl oturum başlatılıyor..
$ch = curl_init();
//URL
curl_setopt($ch, CURLOPT_URL, "http://site/index.php");
curl_setopt($ch,CURLOPT_COOKIE,"masa@site[2].txt=site_session_key70ea48d4ee1d7f8a971741b789a2beb8");
curl_exec($ch); // ekrana basılıyor
curl_close($ch); // sunucu hafızasından siliniyor
?>
her iksinide denedim fakat hala doğrulamayı geçemedim kodum bu
PHP:<? // Curl oturum başlatılıyor.. $ch = curl_init(); //URL curl_setopt($ch, CURLOPT_URL, "http://site/index.php"); curl_setopt($ch,CURLOPT_COOKIE,"masa@site[2].txt=site_session_key70ea48d4ee1d7f8a971741b789a2beb8"); curl_exec($ch); // ekrana basılıyor curl_close($ch); // sunucu hafızasından siliniyor ?>
caesarın belirttiği kodda cookie değeri çok büyük bişey 20-30 satır yazı ismi ise txt ismini verdiğimda hata veriyor.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, "in/cookies");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_COOKIEFILE, "in/cookies");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch,CURLOPT_REFERER,"siteadresi.com");