Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function auto($url){
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL,$url);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($curl, CURLOPT_HEADER, 1);
- curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36");
- $ch = curl_exec($curl);
- curl_close($curl);
- return($ch);
- }
- ?>
- <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>
- Keepvid
- </title>
- <link rel="shortcut icon" href="favicon.ico"/>
- </head>
- <body style="margin: auto; max-width: 640px;">
- <span>
- Youtube Url :
- </span><br>
- <form method="post">
- <input type="text" name="link" placeholder="http://youtube.com/watch?v=sRFg5pR-Nt4" value="<?php echo (isset($_POST['link'])) ? htmlentities($_POST['link']) : ''; ?>" class="input" style="width:95%">
- <br>
- <input type="submit" name="post" value="Get Download Link">
- </form>
- <br>
- <hr style="background-color:#cccccc;height:1px;border:0px solid #fff;margin:0.3em auto;width:100%;" />
- <?php
- if(isset($_POST['post'])){
- $abc = $_POST['link'];
- $baba = auto('http://keepvid.com/?url='.$abc);
- $bc = strpos($baba, 'clear="both" /><br /></div>');
- $confirms = substr($baba, $bc);
- $confir = explode('<a',$confirms);
- for($i=1;$i<= count($confir);$i++){
- $link = substr($confir[$i-1], strpos($confir[$i-1], 'href=') + 6);
- $link = substr($link, 0, strpos($link, '</b>'));
- if(ereg('googlevideo', $link)){
- $link=str_replace('&','&',$link);
- $link=str_replace('" class="l" style=', '', $link);
- $url = substr($link, 0, strpos($link, '"'));
- if(ereg('download=', $link)){
- $panjang = substr($link, strpos($link, 'download="') + 10);
- $judul = substr($panjang, 0, strpos($panjang, '">'));
- echo '<a class="fcs" href="'.$url.'">» '.$judul.'</a><hr style="background-color:#cccccc;height:1px;border:0px solid #fff;margin:0.3em auto;width:100%;" />';
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement