Advertisement
Guest User

Untitled

a guest
Mar 5th, 2023
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for SourceGuardian Encoder)
  6. *
  7. * @ Version : 5.0.1.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.04.2022
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function validate_request()
  15. {
  16. if (empty($_GET['h']) || empty($_GET['s']) || empty($_GET['l']) || empty($_GET['la']) || empty($_GET['t'])) {
  17. return false;
  18. }
  19.  
  20. $order = ['s', 'l', 'la', 't', 'b', 'bs'];
  21. $str = [];
  22.  
  23. foreach ($order as $o) {
  24. $str[] = $_GET[$o] ?? '';
  25. }
  26.  
  27. $h = hash('sha256', implode($str) . 'tgrfe3ghDgt5dr#56fr%g');
  28.  
  29. if ($h != $_GET['h']) {
  30. return false;
  31. }
  32.  
  33. return $_GET;
  34. }
  35.  
  36. function read_stream($params)
  37. {
  38. global $CONFIG;
  39. $stream = new Onestream\MpegTsStream($CONFIG);
  40. $stream->readStream($params);
  41. }
  42.  
  43. function mark_line_activity_closed($lineActivityId)
  44. {
  45. global $CONFIG;
  46. $dbh = get_connection($CONFIG);
  47. $q = $dbh->prepare('UPDATE line_activity SET used_at = NOW(), updated_at = NOW(), is_closed=true, reason=? WHERE id = ? AND is_closed=false');
  48. $q->execute(['process exit ' . getmypid(), $lineActivityId]);
  49. }
  50.  
  51. function get_playlist($playlistPath, $prebuffer = 0, $segmentSize = 10)
  52. {
  53. for ($count = 0; !file_exists($playlistPath) && ($count <= 40); $count++) {
  54. usleep(500000);
  55. }
  56.  
  57. try {
  58. $content = file_get_contents($playlistPath);
  59. }
  60. catch (Exception $e) {
  61. return [];
  62. }
  63.  
  64. $last = NULL;
  65. $all = [];
  66. $matches = [];
  67. if (preg_match_all('/(.*?)\\.ts/', $content, $matches) && count($matches)) {
  68. foreach ($matches[0] as $match) {
  69. $last = $match;
  70. ...............................................................................
  71. ..............................................
  72. ........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement