<?php
/* BU DEGERLERI DEGISTIRIN*/
$cookie = "locale=tr; dtCookie=v_4_srv_1_sn_A6B3B008E2504DAC4BB18EBD6F173A37_perc_100000_ol_0_mul_1_app-3Aa6235131c73ba348_1; BIGipServer~Farabi~BSD_Prod_BTKakademi_Pool=3373473708.20480.0000; account_id=51; access_token=eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIyMzkxNjY4IiwiZG9tYWluIjoiQlRLIiwiaXNzIjoiS0IiLCJwaWQiOjIzOTQwNjgsIm9pZCI6NTEsImV4cCI6MTczMDAyNjg3MSwidXVpZCI6ImQwODc2YTE0LWJjNWYtNDZlMi1hNzI1LWZiYTNlZGM0ZDhlMyIsImlhdCI6MTcyOTk0MDQ3MSwianRpIjoiNWNjYzQxYTUtY2U3YS00NDEzLTg2NTctOWE1Y2VjZWFjNTQ3In0.NqjJ4-FOD8g-a5DuZkiSednP07AwBCzeEpA87xgAMmc0bw-HFYmKE7y1_P297oC_vpu5PrmSEVjo78NPr4q6CrFt0oSgvxqTAdI7v6SXfJFMZGTG5K9HPkPC_CSYQKdfyC6pqhO35hiXyyZeAiAm6KCoYWmlqwy8KCfO7A75L0hnXKg8aDckBfaBvtNLXb2U2j7Uo4lQ5_GclsDGa7EDyWf25NhRukFG0VzlYGHbq5h2CPEDXJ2x-UgDimGtyYVZaeXCo_hsMLwnQ939v0NWrN-1sY868YyFszsSyEilb9faYaDWgQ_A4q6VHPaffrAeA4mARGlOYuPNTLcjJoF6oA; pacc_id=2391668; pal=true; TS01104502=0149fb3c470e9b97f23995a3e3d2602191c8318685b4a79239ddd2da81a72bbfc39da17956119bfe49e5ac73b812f743a4e2a34e833034dac91067635f1b159fe154b90634f0333cdb5c163d62643597a78af4b30d73db6774670e40b45226eb28d191f13f";
$kursURL = "https://w...content-available-to-author-only...v.tr/portal/course/cocuklar-icin-yapay-zeka-10657";
/* BU DEGERLERI DEGISTIRIN*/
$kursID = explode("/", $kursURL)[5];
function btkAkademiTamamla($i, $cookie, $url)
{
CURLOPT_URL => "https://w...content-available-to-author-only...v.tr/portal/course/deliver/update-attempt/{$i}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"successStatus\":\"SUCCESS\",\"completionPercentage\":100,\"successPercentage\":100,\"attemptDuration\":95,\"totalDuration\":1000,\"newAttempt\":false,\"duration\":95,\"lastPosition\":422}",
CURLOPT_HTTPHEADER
=> array( "Connection: keep-alive",
"Accept: application/json, text/plain, */*",
"X-CSRF-TOKEN: e1c922a6-429d-484f-8f95-710219e6bf03",
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 OPR/68.0.3618.125",
"Content-Type: application/json;charset=UTF-8",
"Origin: https://w...content-available-to-author-only...v.tr",
"Sec-Fetch-Site: same-origin",
"Sec-Fetch-Mode: cors",
"Sec-Fetch-Dest: empty",
"Referer: {$url}",
"Accept-Language: en-US,en;q=0.9",
"Cookie: {$cookie}"
),
));
echo $response;
}
function siteGet($url, $cookie){
CURLOPT_URL => "{$url}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER
=> array( "Connection: keep-alive",
"Accept: application/json, text/plain, */*",
"X-CSRF-TOKEN: e1c922a6-429d-484f-8f95-710219e6bf03",
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 OPR/68.0.3618.125",
"Content-Type: application/json;charset=UTF-8",
"Origin: https://w...content-available-to-author-only...v.tr",
"Sec-Fetch-Site: same-origin",
"Sec-Fetch-Mode: cors",
"Sec-Fetch-Dest: empty",
"Referer: {$url}",
"Accept-Language: en-US,en;q=0.9",
"Cookie: {$cookie}"
),
));
return $response;
}
$re = '/<a href=".portal.course.deliver.'.$kursID.'.selectCourseId=(.*?)">/m';
$str = siteGet($kursURL, $cookie);
$veriler = [];
foreach ($matches as $mm){
$veriler[] = $mm[1];
}
foreach ($veriler as $id){
btkAkademiTamamla($id, $cookie, $kursURL);
}
PD9waHAKCnNldF90aW1lX2xpbWl0KC0xKTsKCi8qIEJVIERFR0VSTEVSSSBERUdJU1RJUklOKi8KJGNvb2tpZSA9ICJsb2NhbGU9dHI7IGR0Q29va2llPXZfNF9zcnZfMV9zbl9BNkIzQjAwOEUyNTA0REFDNEJCMThFQkQ2RjE3M0EzN19wZXJjXzEwMDAwMF9vbF8wX211bF8xX2FwcC0zQWE2MjM1MTMxYzczYmEzNDhfMTsgQklHaXBTZXJ2ZXJ+RmFyYWJpfkJTRF9Qcm9kX0JUS2FrYWRlbWlfUG9vbD0zMzczNDczNzA4LjIwNDgwLjAwMDA7IGFjY291bnRfaWQ9NTE7IGFjY2Vzc190b2tlbj1leUpoYkdjaU9pSlNVekkxTmlKOS5leUp6ZFdJaU9pSXlNemt4TmpZNElpd2laRzl0WVdsdUlqb2lRbFJMSWl3aWFYTnpJam9pUzBJaUxDSndhV1FpT2pJek9UUXdOamdzSW05cFpDSTZOVEVzSW1WNGNDSTZNVGN6TURBeU5qZzNNU3dpZFhWcFpDSTZJbVF3T0RjMllURTBMV0pqTldZdE5EWmxNaTFoTnpJMUxXWmlZVE5sWkdNMFpEaGxNeUlzSW1saGRDSTZNVGN5T1RrME1EUTNNU3dpYW5ScElqb2lOV05qWXpReFlUVXRZMlUzWVMwME5ERXpMVGcyTlRjdE9XRTFZMlZqWldGak5UUTNJbj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