طيب ...
هذا كود يستعمل ال applet الموجودة في موقع keepvid
(من حفر حفرة لأخيه وقع فيها)
ورح اجرب اظبط الكود اللي نزلته من الموقع
لإنه مش شغال معي على الجهاز
http://askphp.info/get.php
كود PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Keepvid leech</title>
<style type="text/css">
html {padding:0;margin:0;}
body {padding:25px 0px;margin:0;text-align:center;}
.container {width:760px;margin:0 auto;text-align:left;}
.header {display:block;margin:0 auto;width:501px;}
.header-o {text-align:center;}
.header .logo {text-indent:-10000px;display:block;height:52px;width:179px;background-image:url(http://keepvid.com/logo.gif);border:none;float:left;}
.header .bookmark {text-indent:-10000px;display:block;height:52px;width:282px;background-image:url(http://keepvid.com/bookmark.png);border:none;float:left;margin-left:40px;margin-bottom:15px;}
.download-o {border:1px solid #ACD;width:758px;}
.download-i {border:1px solid #FFF;background-color:#197EB1;}
.download {display:block;font-family:tahoma;font-size:11px;font-weight:bold;padding:0 0 0 9px;color:#FFF;margin:10px 0 9px 0;}
.download .text {vertical-align:middle;font-family:tahoma;font-size:11px;line-height:13px;height:15px;width:625px;border:1px solid #086A9C;padding-top:2px;text-indent:2px;color:#999;}
.download .submit {vertical-align:middle;font-family:tahoma;font-size:10px;line-height:13px;padding:0px 0 2px 0;height:22px;width:78px;font-weight:bold;color:#444;}
.links {width:760px;margin-top:20px;font-family:tahoma;font-size:11px;color:#999;}
.links h2 {color:#FFF;font-family:tahoma;font-size:11px;font-weight:bold;padding:8px 9px;border:1px solid #FFF;margin:0;background-color:#7EC836;}
.links a {color:#999;text-decoration:underline;}
.links a:hover {color:#666;}
.links a.link {font-weight:bold;color:#64B119;}
.links a.link:hover {color:#438800;}
.links-h {border:1px solid #C4DEAB;}
.links-c {padding:6px 10px 10px 10px;line-height:16px;}
.links-c em {font-style:normal;color:#666;}
.watch {width:760px;margin-top:20px;}
.watch h2 {color:#FFF;font-family:tahoma;font-size:11px;font-weight:bold;padding:8px 9px;border:1px solid #FFF;margin:0;background-color:#C83636;}
.watch-h {border:1px solid #DEABAB;}
.watch-c {padding:10px 10px 10px 10px;line-height:16px;}
.sponsors {margin-top:15px;}
.sponsors small.label {font-size:10px;color:#B2B2B2;font-family:tahoma;}
.sponsors a {color:#197EB1;}
.sponsors a:visited {color:#197EB1;}
.sponsors a:hover {color:#00547F;text-decoration:underline;}
.sponsors-s {margin-top:5px;font-family:arial;font-size:12px;color:#999;}
.sponsors-s small.label-s {font-size:10px;color:#B2B2B2;font-family:tahoma;float:right;}
.sponsors-s a {color:#197EB1;text-decoration:none;}
.sponsors-s a:visited {color:#197EB1;text-decoration:none;}
.sponsors-s a:hover {color:#00547F;text-decoration:underline;}
.content {width:758px;margin-top:20px;font-family:tahoma;font-size:11px;color:#666;border:1px solid #D4D4D4;line-height:16px;}
.content a {color:#197EB1;text-decoration:underline;}
.content a:visited {color:#197EB1;}
.content a:hover {color:#00547F;text-decoration:underline;}
.content-i {padding:10px;padding-bottom:0px;margin-bottom:10px;}
.content h2 {color:#333;font-size:12px;font-weight:bold;padding:0 0 8px 0;border-bottom:1px dotted #CCC;margin:0 0 10px 0;}
.footer {font-size:10px;font-family:tahoma;color:#A8A8A8;margin-top:30px;text-align:center;width:760px;}
.footer a {color:#999;text-decoration:none;}
.footer a:hover {color:#666;text-decoration:underline;}
a.top-videos-a {font-size:11px;color:#666;text-decoration:underline;font-weight:bold;}
a.top-videos-a:visited {color:#666;}
a.top-videos-a:hover {color:#333;text-decoration:none;}
img.top-videos-img {width:65px;height:48px;border:none;float:left;margin-right:8px;}
div.top-videos-div {float:left;color:#999;line-height:14px;}
i.top-videos-i {color:#64B119;font-style:normal;}
.adbriterrr a{color:#999;}
.nm {display:none;}</style>
<!--[if IE]><style type="text/css">.header .bookmark {background-image:url(http://keepvid.com/bookmark-ie.png);}</style><![endif]-->
<script type="text/javascript">if (parent.frames.length > 0) {window.top.location.href = location.href;}var loc = unescape(window.location.toString().split('url=')[1]);if(loc.match("youtube.com\/watch#!")){window.location = "http://keepvid.com/?url=" + escape(loc.replace("\/watch#!", "\/watch?"));}else if(loc.match("youtube.com\/v\/")){window.location = "http://keepvid.com/?url=" + escape("http://www.youtube.com/watch?v=" + loc.match("youtube.com\/v\/([a-zA-Z0-9-_]+)")[1]);}else if(loc.match("youtube.com\/") && loc.match("p\/[a-z0-9\/]+\/[a-zA-Z0-9-_]+")){window.location = "http://keepvid.com/?url=" + escape("http://www.youtube.com/watch?v=" + loc.match("p\/[a-z0-9\/]+\/([a-zA-Z0-9-_]+)")[1]);}var vidid = loc.match("v=([a-zA-Z0-9-_]+)")[1];</script>
</head>
<body>
<div class="container">
<form method="post">
<input type="text" name= "url"/>
<input type="submit" />
</form>
<?php
if(isset($_POST['url']))
{
$url = $_POST['url'];
parse_str(parse_url($url,PHP_URL_QUERY),$vid);
?>
<script type="text/javascript">
function jloaded(){
document.getElementById('instructs').style.display = 'none';
document.getElementById('timeoutprocess').style.display = 'block';
document.getElementById('loader').innerHTML = '<b style="color:#222;"> Processing links, please wait...</b>';
}
function kv_info(kv_title, kv_site, kv_url, kv_imgurl){
var loc = unescape(window.location.toString().split('url=')[1]);
if(document.getElementById('kv_info').innerHTML == '') document.getElementById('kv_info').innerHTML = '<a href="'+kv_url+'" class="top-videos-a" target="_blank"><img src="'+kv_imgurl+'" class="top-videos-img"></a><div class="top-videos-div"><a href="'+kv_url+'" class="top-videos-a" target="_blank">'+kv_title+'</a><br>'+kv_site+'</div><br clear="left"><br>';
}
function kv_error(errormsg){
document.getElementById('loader').style.display = 'none';
document.getElementById('loaderimg').style.display = 'none';
document.getElementById('errormsg').innerHTML = '<b style="color:#222;">Error: ' + errormsg + '</b>';
}
function kv_ds(a_id, kv_type, kv_res, kv_url, kv_title){
if(document.getElementById('linkse1').innerHTML=='' && loc.match("youtube.com")) document.getElementById('linkse1').innerHTML = '<span style="color:#8B0000;"><b>*NEW*</b></span> <a href="'+unescape(window.location.href.toString().replace("keepvid.com", "snipmp3.com"))+'" class="link" target="_blank">›› Download MP3 ‹‹</a> - Standard Quality';
document.getElementById('loader').style.display='none';
document.getElementById('loaderimg').style.display='none';
var e=document.getElementById("linkse");
var nd=document.createElement("div");
if(a_id.match("^"+"dl_")=="dl_" || a_id.match("^"+"gv_")=="gv_") { kv_url = kv_url+'&title='+kv_title+' [www.keepvid.com]'; }
nd.innerHTML='<a href="'+kv_url+'" class="link" target="top">›› Download '+kv_type+' ‹‹</a> - '+kv_res;
e.appendChild(nd);
}
setTimeout("if(document.getElementById('loader').innerHTML == '<b style=\"color:#222;\"> Processing links, please wait...</b>'){document.getElementById('loaderimg').style.display = 'none';document.getElementById('loader').innerHTML='<b style=\"color:#222;\">Error: Please restart your browser and remember to click Run / Allow / Always Trust when prompted.</b><br />';}else if(document.getElementById('loader').style.display != 'none'){document.getElementById('loaderimg').style.display = 'none';document.getElementById('loader').innerHTML='<b style=\"color:#222;\">Error: Please <a href=\"http://www.java.com/getjava/\" rel=\"nofollow\" target=\"_blank\" class=\"link\">click here</a> to download Java. If you already have Java, please restart your browser and try again.</b><br>';}", 60000);
if(navigator.javaEnabled() == false){
document.getElementById('loader').style.display = 'none';
document.getElementById('loaderimg').style.display = 'none';
document.getElementById('javadisabled').style.display = 'block';
}
</script>
<br><br>
<div id="kv_info"></div>
<img src="http://keepvid.com/java/ajax-loader.gif" id="loaderimg" height="11" width="16" border="0">
<div id="loader"><b style="color:#222;" id="timeoutprocess"> Loading Java applet...</b>
<span id="instructs" style="color:#C33;"><br /><br />To download videos, please click '<b>Run</b>' when prompted.<br>
Tick the box '<b>Always trust content from this publisher</b>' to download seamlessly in the future.</span>
</div>
<div id="errormsg"></div>
<div id="javadisabled" style="display:none;">
It appears you do not have Java installed or it is disabled on your system.<br>
You can get Java <a href="http://www.java.com/getjava/" class="link" target="_blank">here</a>.<br><br>
If you are still having difficulty with Java, <a href="http://www.java.com/en/download/help/index_installing.xml" class="link" target="_blank">check here</a> for installing Java, or <a href="http://www.java.com/en/download/help/enable_browser.xml" class="link" target="_blank">here</a> for detailed instructions on enabling Java in your browser.
</div>
<div id="linkse"></div>
<div id="linkse1"></div>
<?php
echo '
<applet code="KeepVidDownloader.class" archive="http://keepvid.com/java/keepvid.19.jar" height="0" width="0" align="center" MAYSCRIPT>
<param name="v" value="'.$vid["v"].'"/>
<param name="u" value="'.$url.'"/>
<param name="site" value="youtube.com"/>
<param name="ua" value="Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0"/>
</applet><br><br>';
}
?>
</div>
</body>
</html>