Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The internet is full of not working examples so here's a script for anyone who needs. Something is wrong with the flv files. Their links deliver .txt files but it's good with webm and mp4. I need that for the pr0n sites too hehehe</p> <pre><code>&lt;?php //$debug = true; if(empty($debug)) $debug = false; if(empty($_GET['id'])) die('no id'); if(!preg_match('/^[A-Z0-9-_]+$/i', $_GET['id'])) die('invalid character in id'); else $id = $_GET['id']; if(empty($_GET['type'])) $type = 'mp4'; else if(!preg_match('/^[A-Z]+$/i', $_GET['type'])) die('invalid character in type'); else $type = strtolower($_GET['type']); $url = 'http://youtube.com/get_video_info?video_id='; $key = 'url_encoded_fmt_stream_map'; $content = file_get_contents($url.$id); parse_str($content, $result); if($debug) { echo $url.$id.'&lt;br/&gt;'; echo $key.'&lt;br/&gt;'; echo $type.'&lt;br/&gt;'; echo '&lt;pre&gt;'; print_r($result); echo '&lt;/pre&gt;'; } else { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="videofile.'.$type.'"'); } $type = 'type=video/'.$type; $files = explode(',url=', $result[$key]); $files[0] = substr($files[0], 4); for($i=0; $i&lt;count($files); $i++) { $file = urldecode($files[$i]); $found = strpos($file, $type) &gt; -1; if ($debug) { if ($found) echo '[THIS]'; echo '&lt;a href="'.$file.'"&gt;'.$file.'&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;'; } else { if ($found) { $file = explode('; codecs=', $file); @readfile($file[0]); break; } } } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload