php-es.org
Submit
Archive
RECENT PASTES
juchipilo
19 hours ago
vejotren
5 days ago
juchipilo
81 days ago
juchipilo
130 days ago
download-youtube
337 days ago
Anonymous
340 days ago
OSPHPChat
340 days ago
Welcome! Here you can paste sources and general debugging text, You can even set yourself a password if you want to keep it just for yourself.
Posted by download-youtube on March Mon 21st 10:23 PM - Never Expires
Download
|
New paste
<?php
$exttmp
=
"windmakeresmichilakil"
;
if
(
$_POST
[
'video'
]
!=
""
)
{
$url
=
$_POST
[
'video'
]
;
$context
=
stream_context_create
(
$opts
)
;
$html
=
file_get_contents
(
$url
)
;
$title
=
explode
(
'<meta name="title" content="'
,
$html
)
;
$title
=
explode
(
'">'
,
$title
[
1
]
)
;
$title
=
$title
[
0
]
;
echo
"Haciendo peticion al video de titulo : "
.
$title
.
"
\n
<br/>"
;
$eh
=
explode
(
"fmt_url_map="
,
$html
)
;
$neh
=
explode
(
"="
,
$eh
[
1
]
)
;
$vh
=
explode
(
"|"
,
urldecode
(
$neh
[
0
]
)
)
;
$ct
=
count
(
$vh
)
-
1
;
$videosource
=
$vh
[
$ct
]
;
echo
"Descargando video..<br/>"
;
//$video = file_get_contents($videosource);
$filemd5name
=
md5
(
date
(
"Y-m-d h:i:s"
)
)
;
exec
(
"wget -b -O $filemd5name.$exttmp
\"
$videosource
\"
"
)
;
echo
"Video Descargado <br/>"
;
echo
"<a href='?md5fname=$filemd5name&tvideo=$title'>Descargar Video</a>"
;
}
elseif
(
$_GET
[
'md5fname'
]
!=
""
)
{
if
(
file_exists
(
$_GET
[
'md5fname'
]
.
".$exttmp"
)
==
false
)
{
die
(
"Archivo invalido :( "
)
;
}
if
(
$_GET
[
'tvideo'
]
==
""
)
{
$_GET
[
'tvideo'
]
=
"Video"
;
}
header
(
"Content-type: application/force-download"
)
;
header
(
"Content-Transfer-Encoding: Binary"
)
;
header
(
"Content-length: "
.
filesize
(
$file
)
)
;
header
(
"Content-disposition: attachment; filename='{$_GET['tvideo']}.flv'"
)
;
readfile
(
$_GET
[
'md5fname'
]
.
".$exttmp"
)
;
}
else
{
echo
"
<form method='POST'>
url de video : <input type='text' name='video' />
<br/><input type='submit' value='Enviar!'>
</form>
"
;
}
?>
Language:
Apt sources.list
BASH
C
C++
CSS
HTML 4.01 strict
Java
JavaScript
mIRC
Perl
PHP
Plain text
Python
Ruby on Rails
Ruby
SQL
TCL
WHOIS (RPSL format)
XML
xorg.conf
----------------------------
ABAP
ActionScript
ActionScript 3
Ada
Apache
AppleScript
Apt sources.list
ASM
ASP
AutoIt
AviSynth
BASH
Basic4GL
Brainfuck
BibTeX
BlitzBasic
BNF
Boo
C
C for Macs
CADDCL
CADLisp
CFDG
ColdFusion
CIL
CMake
COBOL
C++ (with QT extensions)
C++
C#
CSS
D
DCS
Delphi
Diff-output
DIV
DOS
dot
Eiffel
E-mail (mbox\eml\RFC format)
Erlang
FO
Fortran
FreeBasic
Genero
GNU Gettext .po/.pot
glSlang
GML
GNUPlot
Groovy
Haskell
HQ9+
HTML 4.01 strict
Unoidl
INI
Inno Script
INTERCAL
IO
Java
Java 5
JavaScript
KiXtart
KLone with C
KLone with C++
LaTeX
Generic Lisp
Locomotive Basic
LOLcode
@Formula/@Command
LotusScript
Lightwave Script
Linden Script
LUA
Motorola 68000 Assembler
GNU make
Matlab
mIRC
Modula-3
Microchip Assembler
MXML
MySQL
NSIS
Oberon-2
Objective-C
Objective Caml
OOo Basic
Oracle 11i
Oracle 8
Pascal
Per (forms)
Perl
PHP (Brief version)
PHP
PIC16 Assembler
Pixel Bender
Plain text
Oracle 9.2 PL/SQL
Povray
PowerShell
Progress
Prolog
Property
ProvideX
Python
QuickBASIC
Ruby on Rails
Rebol
Microsoft REGEDIT
Robots.txt
Ruby
SAS
Scala
Scheme
SciLab
sdlBasic
Smalltalk
Smarty
SQL
TCL
Tera Term Macro
thinBasic
T-SQL
TypoScript
Visual Basic
Visual Basic .NET
Verilog
VHDL
Vim
Visual FoxPro
Visual Prolog
Whitespace
WHOIS (RPSL format)
WinBatch
XML
xorg.conf
Axapta/Dynamics Ax X++
ZiLOG Z80 Assembler
To highlight particular lines, prefix each line with @@
<?php $exttmp = "windmakeresmichilakil"; if($_POST['video'] != ""){ $url = $_POST['video']; $context = stream_context_create($opts); $html = file_get_contents($url); $title = explode('<meta name="title" content="',$html); $title = explode('">', $title[1]); $title = $title[0]; echo "Haciendo peticion al video de titulo : ".$title."\n<br/>"; $eh = explode("fmt_url_map=",$html); $neh = explode("=",$eh[1]); $vh = explode("|",urldecode($neh[0])); $ct = count($vh) - 1; $videosource = $vh[$ct]; echo "Descargando video..<br/>"; //$video = file_get_contents($videosource); $filemd5name = md5(date("Y-m-d h:i:s")); exec("wget -b -O $filemd5name.$exttmp \"$videosource\""); echo "Video Descargado <br/>"; echo "<a href='?md5fname=$filemd5name&tvideo=$title'>Descargar Video</a>"; }elseif($_GET['md5fname']!=""){ if(file_exists($_GET['md5fname'].".$exttmp") == false){ die("Archivo invalido :( "); } if($_GET['tvideo'] == ""){ $_GET['tvideo'] = "Video"; } header("Content-type: application/force-download"); header("Content-Transfer-Encoding: Binary"); header("Content-length: ".filesize($file)); header("Content-disposition: attachment; filename='{$_GET['tvideo']}.flv'"); readfile($_GET['md5fname'].".$exttmp"); }else{ echo " <form method='POST'> url de video : <input type='text' name='video' /> <br/><input type='submit' value='Enviar!'> </form> "; } ?>
Name/Title (Optional)
How long should we keep your paste?
One day
One month
Forever
Password (Optional)
© 2012 - Powered by
PASTE
1.0