Merhaba, arkadaşlar bizim üniversitenin bir öğrenci bilgi sistemi var tam bir işkence. Her seferinde giriş yap notlara ulaş mobilde çok zor olabiliyor. Bunun için bir bot yazayım istedim ama veri sürekli boş dönüyor.
https://obs.mku.edu.tr/oibs/ogrenci/ verileri almam gereken adres burası file_content denedim ama boş döndü neden yapar.
işlem:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<head>
<title> Deneme </title>
</head>
<body>
<?php
$site = "http://obs.mku.edu.tr/oibs/ogrenci/not_listesi_op.aspx";
$icerik = file_get_contents($site);
echo $icerik;
?>
</body>
</html>
sonuç:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<head>
<title> Deneme </title>
</head>
<body>
</body>
</html>
Php bot hakkında yardım
3
●427
- 29-12-2014, 21:32:16Kimlik doğrulama veya yönetimden onay bekliyor.
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8"> <title></title> </head> <body> <?php $site = "http://obs.mku.edu.tr/oibs/ogrenci/not_listesi_op.aspx"; $ch = curl_init(); curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com'); curl_setopt($ch, CURLOPT_URL, $site); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $sonuc = curl_exec($ch); echo $sonuc; curl_close($ch); ?> </body> </html>
- 29-12-2014, 23:13:55numanturle adlı üyeden alıntı: mesajı görüntüle
Öncelikle ilgin için çok teşekkür ederim ancak yine boş sonuç gösteriyor hocam.
Localde curl sorunu varmış, wampserver kurup deniyorum.
Curl'u hallettim oturum açmış olsam da bu sefer,
7Uzun süre işlem yapılmadığı için
Oturum zaman aşımına uğradı.
Sisteme tekrar giriş yapılması gerekmektedir.
hatası veriyor sanırım bunu da curl ile yaptırmam gerekecek normal oturumu kabul etmeyecek gibi