mirror of
https://github.com/hakasenyang/marumaru-php-parser
synced 2026-08-22 02:03:08 +09:00
First commit
마루마루 관련 파일입니다.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
include_once '_function.php';
|
||||
$marumaru = new Marumaru();
|
||||
$data = $marumaru->WEBParsing('http://marumaru.in/'.$_GET['href']);
|
||||
$data = str_replace('class="con_link" ', 'target="_blank" ', $data);
|
||||
$thumb = $marumaru->splits($data, '<meta property="og:image" content="', '"');
|
||||
$a = explode('<a target="_blank" href="', $data);
|
||||
for($i=1;$i<count($a);$i++)
|
||||
{
|
||||
$href = explode('/', explode('"', $a[$i])[0])[4];
|
||||
$title = str_replace(' ', ' ', strip_tags('<a target="_blank" href="'.explode('</a>', $a[$i])[0]));
|
||||
if(!$title) continue;
|
||||
$episodes[] = ['href'=>$href, 'title'=>$title];
|
||||
}
|
||||
echo json_encode(array('cover'=>$thumb, 'episodes'=>$episodes));
|
||||
Reference in New Issue
Block a user