Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
error_reporting(E_ERROR | E_PARSE);
class BS_Getlink
{
public function picasaweb_google_com($link, $sub='', $title='') {
preg_match('/https://picasaweb.google.com/(.*)/(.*)#(.+?)/U', $link, $id);
if($id) {
$s = explode('?', $id[2]);
if($s[1])
$albumUrl = 'https://picasaweb.google.com/data/entry/tiny/user/'.$id[1].'/photoid/'.$id[3].'?'.$s[1];
else
$albumUrl = 'https://picasaweb.google.com/data/entry/tiny/user/'.$id[1].'/photoid/'.$id[3];
if(isset($_SESSION['gg_token']) && $_SESSION['gg_token'])
$get = $this->curl($albumUrl, $_SESSION['gg_token']);
else
$get = $this->curl($albumUrl, '');
$mimes = array('image/jpeg', 'image/png', 'image/gif');
preg_match_all("/<media:content url='(.*)' height='(.*)' width='(.*)' type='(.*)'/>/U", $get, $data);
$sources = array();
foreach($data[2] as $i => $quality)
{
if((strpos($data[1][$i], 'm18') || strpos($data[1][$i], 'redirector') and !in_array($data[1][$i], $mimes)))
$sources[] = array('file' => $data[1][$i], 'type' => 'mp4', 'label' => '360p', 'default' => true);
if((strpos($data[1][$i], 'm22') || strpos($data[1][$i], 'redirector')) and !in_array($data[1][$i], $mimes))
$sources[] = array('file' => $data[1][$i], 'type' => 'mp4', 'label' => '720p');
if((strpos($data[1][$i], 'm32') || strpos($data[1][$i], 'm37') || strpos($data[1][$i], 'redirector')) and !in_array($data[1][$i], $mimes))
$sources[] = array('file' => $data[1][$i], 'type' => 'mp4', 'label' => '1080p');
}
if($sources)
return json_encode(array('playlist' => array('0' => array("sources" => $sources, 'title' => $title, 'image' => $data[1][0], "tracks" => $sub))));
return $this->youtube_com('https://www.youtube.com/watch?v=tpV5O5D0rl8', $sub, $title);
} else {
$url = urldecode($link);
if(stristr($url, '#')) list($url, $id) = explode('#', $url);
if(isset($_SESSION['gg_token']) && $_SESSION['gg_token'])
$get = $this->curl($url, $_SESSION['gg_token']);
else
$get = $this->curl($url, '');
if($id) $gach = explode($id, $get);
$gach = explode('{"url":"', ($id)?$gach[7]:$get);
$thumb = explode('"', $gach[1]);
$sources = array();
for($i=2; $i<5; $i++) {
$data = urldecode(reset(explode('"', $gach[$i])));
if(strpos($data, '=m18'))
$sources[] = array('file' => $data, 'type' => 'mp4', 'label' => '360p', 'default' => true);
if(strpos($data, '=m22'))
$sources[] = array('file' => $data, 'type' => 'mp4', 'label' => '720p');
if(strpos($data, '=m32') || strpos($data, '=m37'))
$sources[] = array('file' => $data, 'type' => 'mp4', 'label' => '1080p');
}
if($sources)
return json_encode(array('playlist' => array('0' => array("sources" => $sources, 'title' => $title, 'image' => $thumb, "tracks" => $sub))));
return $this->youtube_com('https://www.youtube.com/watch?v=tpV5O5D0rl8', $sub, $title);
}
}
public function drive_google_com($link, $sub='', $title='') {
$link = 'https://api.blogit.vn/getlink.php?link='.$link;
$get = $this->curl($link, '');
$json_link = json_decode($get);
$data = $json_link->result->data->link;
$sources = array();
foreach($data as $i) {
$linkMp4 = $i->file;
$label = $i->label;
if($label == '360')
$sources[] = array('file' => $linkMp4, 'type' => 'mp4', 'label' => '360p', 'default' => true);
if($label == '480')
$sources[] = array('file' => $linkMp4, 'type' => 'mp4', 'label' => '480p');
if($label == '720')
$sources[] = array('file' => $linkMp4, 'type' => 'mp4', 'label' => '720p');
if($label == '1080')
$sources[] = array('file' => $linkMp4, 'type' => 'mp4', 'label' => '1080p');
}
if($sources)
return json_encode(array('playlist' => array('0' => array("sources" => $sources, 'title' => $title, 'image' => '', "tracks" => $sub))));
}
public function photos_google_com($link, $sub='', $title='') {
$get = $this->curl($link, '');
$data = explode('","url', $get);
$data = explode(']', $data[1]);
$data = urldecode($data[0]);
$data = str_replace(array('u003d', 'u0026'), array('=', '&'), 'url'.$data);
preg_match_all('/url=(.*)&itag=/U', $data, $datas);
$sources = array();
foreach($datas[1] as $i => $link) {
if(strpos($link, '=m18'))
$sources[] = array('file' => $link, 'type' => 'mp4', 'label' => '360p', 'default' => true);
if(strpos($link, '=m22'))
$sources[] = array('file' => $link, 'type' => 'mp4', 'label' => '720p');
if(strpos($link, '=m32') || strpos($link, '=m37'))
$sources[] = array('file' => $link, 'type' => 'mp4', 'label' => '1080p');
}
if($sources)
return json_encode(array('playlist' => array('0' => array("sources" => $sources, 'title' => $title, 'image' => '', "tracks" => $sub))));
return $this->youtube_com('https://www.youtube.com/watch?v=tpV5O5D0rl8', $sub, $title);
}
public function youtube_com($link, $sub='', $title='') {
$id = explode('?v=', $link);
$links = 'http://www.youtube.com/get_video_info?&video_id='.$id[1];
if(isset($_SESSION['gg_token']) && $_SESSION['gg_token'])
$get = $this->curl($links, $_SESSION['gg_token']);
else
$get = $this->curl($links, '');
$url_encoded_fmt_stream_map = $itag = $url = '';
parse_str($get);
$data = explode(',',$url_encoded_fmt_stream_map);
krsort($data);
$sources = array();
foreach($data as $i => $format) {
parse_str($format);
$linkMp4 = preg_replace(array("//[^/]+.googlevideo.com/", "//[^/]+.youtube.com/"), "/redirector.googlevideo.com", urldecode($url));
if($itag == '18')
$sources[] = array('file' => $linkMp4, 'type' => 'mp4', 'label' => '360p', 'default' => true);
if($itag == '59')
$sources[] = array('file' => $linkMp4, 'type' => 'mp4', 'label' => '480p');
if($itag == '22')
$sources[] = array('file' => $linkMp4, 'type' => 'mp4', 'label' => '720p');
if($itag == '37')
$sources[] = array('file' => $linkMp4, 'type' => 'mp4', 'label' => '1080p');
$i++;
}
if($sources)
return json_encode(array('playlist' => array('0' => array("sources" => $sources, 'title' => $title, 'image' => '', "tracks" => $sub))));
return $this->youtube_com('https://www.youtube.com/watch?v=tpV5O5D0rl8', $sub, $title);
}
public function lh3_googleusercontent_com($link, $sub='', $title='') {
$thumb = explode('=m', $link);
return json_encode(array('playlist' => array('0' => array("sources" => array('file' => $link, 'type' => 'mp4'), 'title' => $title, 'image' => $thumb[0], "tracks" => $sub))));
}
private function curl($url, $key='') {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if($key) curl_setopt($ch, CURLOPT_HEADER, true);
if($key) curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '.$key));
$response = curl_exec($ch);
curl_close($ch);
return $response;
}
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team