<?php
header("Content-Type: application/json; Charset-UTF-8");
$tc = $_GET['tc'];
$host = "localhost";
$dbname = "101m";
$username = "root";
$password = "";
$db = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $username, $password);
$sql2 = "SELECT * FROM 101m WHERE TC=? LIMIT 1";
$stmt2 = $db->prepare($sql2);
$stmt2->bindParam(1, $tc);
$stmt2->execute();
$result2 = $stmt2->fetch(PDO::FETCH_ASSOC);
$stmt2->closeCursor();
$dogumtarihi = null;
if ($result2) {
$dogumtarihi = $result2["DOGUMTARIHI"];
} else {
$dogumtarihi = "";
}
$dateParts = explode(".", $dogumtarihi);
if (count($dateParts) === 3) {
$dogum_gunu = $dateParts[0];
$dogum_ayi = $dateParts[1];
$dogum_yili = $dateParts[2];
$url = "https://unisis.uludag.edu.tr/YazOkulu/YazOkulu/YazMisafirVarYokOgrenciGetir?dogumAy=$dogum_ayi&dogumGun;=$dogum_gunu&dogumYil;=$dogum_yili&tcKimlikNo;=$tc&_=1690816945197"; // coded by dexus
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$resp = curl_exec($curl);
if ($resp === false) {
$error_response = array(
"error" => "cURL Hatası: " . curl_error($curl)
);
echo json_encode($error_response);
} else {
echo $resp;
}
curl_close($curl);
} else {
$error_response = array(
"error" => "Sistem hatası veya TC sini girdiğiniz kişi şuanda üniversite okumuyor."
);
echo json_encode($error_response);
}
?>
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}