fork download
  1. <?php
  2.  
  3.  
  4. /* BU DEGERLERI DEGISTIRIN*/
  5. $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";
  6. $kursURL = "https://w...content-available-to-author-only...v.tr/portal/course/cocuklar-icin-yapay-zeka-10657";
  7. /* BU DEGERLERI DEGISTIRIN*/
  8.  
  9.  
  10. $kursID = explode("/", $kursURL)[5];
  11.  
  12.  
  13. function btkAkademiTamamla($i, $cookie, $url)
  14. {
  15. $curl = curl_init();
  16.  
  17. CURLOPT_URL => "https://w...content-available-to-author-only...v.tr/portal/course/deliver/update-attempt/{$i}",
  18. CURLOPT_RETURNTRANSFER => true,
  19. CURLOPT_ENCODING => "",
  20. CURLOPT_MAXREDIRS => 10,
  21. CURLOPT_TIMEOUT => 0,
  22. CURLOPT_FOLLOWLOCATION => true,
  23. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  24. CURLOPT_CUSTOMREQUEST => "POST",
  25. CURLOPT_POSTFIELDS => "{\"successStatus\":\"SUCCESS\",\"completionPercentage\":100,\"successPercentage\":100,\"attemptDuration\":95,\"totalDuration\":1000,\"newAttempt\":false,\"duration\":95,\"lastPosition\":422}",
  26. CURLOPT_HTTPHEADER => array(
  27. "Connection: keep-alive",
  28. "Accept: application/json, text/plain, */*",
  29. "X-CSRF-TOKEN: e1c922a6-429d-484f-8f95-710219e6bf03",
  30. "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",
  31. "Content-Type: application/json;charset=UTF-8",
  32. "Origin: https://w...content-available-to-author-only...v.tr",
  33. "Sec-Fetch-Site: same-origin",
  34. "Sec-Fetch-Mode: cors",
  35. "Sec-Fetch-Dest: empty",
  36. "Referer: {$url}",
  37. "Accept-Language: en-US,en;q=0.9",
  38. "Cookie: {$cookie}"
  39. ),
  40. ));
  41.  
  42. $response = curl_exec($curl);
  43.  
  44. curl_close($curl);
  45. echo $response;
  46. }
  47.  
  48. function siteGet($url, $cookie){
  49. $curl = curl_init();
  50.  
  51. CURLOPT_URL => "{$url}",
  52. CURLOPT_RETURNTRANSFER => true,
  53. CURLOPT_ENCODING => "",
  54. CURLOPT_MAXREDIRS => 10,
  55. CURLOPT_TIMEOUT => 0,
  56. CURLOPT_FOLLOWLOCATION => true,
  57. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  58. CURLOPT_CUSTOMREQUEST => "GET",
  59. CURLOPT_HTTPHEADER => array(
  60. "Connection: keep-alive",
  61. "Accept: application/json, text/plain, */*",
  62. "X-CSRF-TOKEN: e1c922a6-429d-484f-8f95-710219e6bf03",
  63. "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",
  64. "Content-Type: application/json;charset=UTF-8",
  65. "Origin: https://w...content-available-to-author-only...v.tr",
  66. "Sec-Fetch-Site: same-origin",
  67. "Sec-Fetch-Mode: cors",
  68. "Sec-Fetch-Dest: empty",
  69. "Referer: {$url}",
  70. "Accept-Language: en-US,en;q=0.9",
  71. "Cookie: {$cookie}"
  72. ),
  73. ));
  74.  
  75. $response = curl_exec($curl);
  76.  
  77. curl_close($curl);
  78. return $response;
  79. }
  80.  
  81. $re = '/<a href=".portal.course.deliver.'.$kursID.'.selectCourseId=(.*?)">/m';
  82. $str = siteGet($kursURL, $cookie);
  83.  
  84. preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
  85.  
  86. $veriler = [];
  87.  
  88.  
  89.  
  90.  
  91. foreach ($matches as $mm){
  92. $veriler[] = $mm[1];
  93. }
  94.  
  95. foreach ($veriler as $id){
  96. btkAkademiTamamla($id, $cookie, $kursURL);
  97. }
Success #stdin #stdout 0.03s 26800KB
stdin
Standard input is empty
stdout
Standard output is empty