forked from kasramp/geekswebbot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tez.php
33 lines (32 loc) · 981 Bytes
/
tez.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
require "vendor/autoload.php";
use PHPHtmlParser\Dom;
$dom = new Dom;
$dom->load('https://video.acunn.com/survivor');
$html = $dom->outerHtml;
$a = $dom->find('div[class=videos-list] div[class=row] div div[class=list-type-one-content] a');
function get_string_between($string, $start, $end){
$string = ' ' . $string;
$ini = strpos($string, $start);
if ($ini == 0) return '';
$ini += strlen($start);
$len = strpos($string, $end, $ini) - $ini;
return substr($string, $ini, $len);
}
// echo count($a);
$tmp = 0;
foreach ($a as $key => $value) {
if ($tmp < 12) {
echo $value->getAttribute('title');
echo "\n";
$url = $value->getAttribute('href');
$data = file_get_contents( $url );
$parsed = get_string_between($data, 'https://video-cdn.acunn.com', '-480p.mp4');
echo 'https://video-cdn.acunn.com'.$parsed.'-480p.mp4';
echo "<br>";
}
$tmp++;
}
echo $a->text;
return 'asal';
print_r($a);