Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- function DAZNSegments($rURL, $rLimit = 20)
- {
- global $rMaxSegments;
- $rMPD = simplexml_load_string(geturl($rURL));
- $rURL = explode('web', $rURL)[0];
- $rBaseURL = $rURL . 'all/dash/';
- foreach ($rMPD->Period->AdaptationSet[0]->ContentProtection as $rContentProtection) {
- if (strtolower($rContentProtection->attributes()->schemeIdUri) == 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed') {
- list($rPSSH) = explode('</cenc:pssh>', explode('<cenc:pssh>', $rContentProtection->asXML())[1]);
- if (!$rPSSH) {
- list($rPSSH) = explode('<', explode('>', $rContentProtection->pssh->asXML())[1]);
- }
- $rVideoStart = NULL;
- $rVideoTemplate = NULL;
- $rObject = [
- 'pssh' => $rPSSH,
- 'audio' => NULL,
- 'video' => NULL,
- 'segments' => [],
- 'add' => 100
- ];
- foreach ($rMPD->Period->AdaptationSet as $rAdaptationSet) {
- $rRepID = $rAdaptationSet->Representation[count($rAdaptationSet->Representation) - 2]->attributes()['id'];
- $rVideoTemplate = str_replace('$RepresentationID$', $rRepID, $rAdaptationSet->SegmentTemplate[0]->attributes()['media']);
- $rInitSegment = str_replace('$RepresentationID$', $rRepID, $rBaseURL . $rAdaptationSet->SegmentTemplate[0]->attributes()['initialization']);
- if ($rAdaptationSet->attributes()['contentType'] == 'video') {
- $rObject['video'] = $rInitSegment;
- foreach ($rAdaptationSet->SegmentTemplate->SegmentTimeline->S as $rSegment) {
- if (isset($rSegment->attributes()['t'])) {
- $rVideoStart = $rSegment->attributes()['t'];
- $rObject['add'] = $rSegment->attributes()['d'];
- }
- }
- }
- }
- foreach ($rMPD->Period->AdaptationSet as $rAdaptationSet) {
- $rThisSegment = NULL;
- $rRepID = $rAdaptationSet->Representation[0]->attributes()['id'];
- $rSegmentTemplate = str_replace('$RepresentationID$', $rRepID, $rAdaptationSet->SegmentTemplate[0]->attributes()['media']);
- $rInitSegment = str_replace('$RepresentationID$', $rRepID, $rBaseURL . $rAdaptationSet->SegmentTemplate[0]->attributes()['initialization']);
- if ($rAdaptationSet->attributes()['contentType'] == 'audio') {
- $rObject['audio'] = $rInitSegment;
- foreach ($rAdaptationSet->SegmentTemplate->SegmentTimeline->S as $rSegment) {
- if (isset($rSegment->attributes()['t'])) {
- $rThisSegment = $rSegment->attributes()['t'];
- $rObject['segments'][$rVideoStart]['audio'] = str_replace('$Time$', $rThisSegment, $rBaseURL . $rSegmentTemplate);
- $rObject['segments'][$rVideoStart]['video'] = str_replace('$Time$', $rVideoStart, $rBaseURL . $rVideoTemplate);
- }
- if (isset($rSegment->attributes()['r'])) {
- $rRepeats = intval($rSegment->attributes()['r']) + 1;
- .............................................................
- .......................................
- ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement