Arkadaşlar Benim bir tane ilahi sitem var.
Bu Sitelere ilahileri ilahi eklerken youtube video IDlerini yazıyoduk ve Youtubeden proxy ile çekiyorduk.Bir haftadır ilahiler çalmamaya başladı acaba youtubeyle ilgili bi sorunmı var . Yardımcı olucak PHP bilgisi olan arkadaş varsa kodlarda oynama yapıp şimdiki haline uyarlayabilir miyiz ?
Yardımlarınız İçin Şimdiden Teşekkürler.
Site adresi:
www.ilahiler.in .....
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$currentPage = $_SERVER["PHP_SELF"];
mysql_select_db($database_geceninrengi, $geceninrengi);
$query_sonyazilar = sprintf("SELECT * FROM yazilar WHERE id = %s ORDER BY id DESC", GetSQLValueString($_GET['id'], "int"));
$sonyazilar = mysql_query($query_sonyazilar, $geceninrengi) or die(mysql_error());
$row_sonyazilar = mysql_fetch_assoc($sonyazilar);
$totalRows_sonyazilar = mysql_num_rows($sonyazilar);
$hjg4789 = $row_sonyazilar['id'];
mysql_select_db($database_geceninrengi, $geceninrengi);
$query_yorumlar = sprintf("SELECT * FROM yorumlar WHERE yaziid = '%s' AND onay='1' ORDER BY id DESC LIMIT 5", $hjg4789);
$yorumlar = mysql_query($query_yorumlar, $geceninrengi) or die(mysql_error());
$row_yorumlar = mysql_fetch_assoc($yorumlar);
$totalRows_yorumlar = mysql_num_rows($yorumlar);
$yaziokunma = sprintf("geceninrengi%s", $row_sonyazilar['id']);
if($_COOKIE[$yaziokunma] == '1'){
} else {
mysql_select_db($database_geceninrengi, $geceninrengi);
mysql_query("UPDATE yazilar SET okunma = okunma+1 WHERE id='$row_sonyazilar[id]'", $geceninrengi);
$cook = $_COOKIE[$yaziokunma] + 1;
setcookie("$yaziokunma", "$cook", time()+86400);
}
$url = "http://www.youtube.com/watch?v=$row_sonyazilar[yazidevami]" ;//
$data = implode("", file($url));
if (preg_match_all("/&t=[^&]*/", $data, $matches))
{
$t = $matches[0][0];
$t = preg_split("/=/", $t);
$t = $t[1];
$v = $url;
$v = preg_split ("/\?v=/", $v);
//$v = preg_split ("/=/", $v);
$v = $v[1];
//echo '&status=ok';
//echo "me=".$youtubeVideoPath;
//header ("Location: $youtubeVideoPath");
}
else
{
echo "null";
}
?><?php
if(!$_SERVER['HTTP_REFERER']){
die('erişim yasak');
}
?><body topmargin="0" leftmargin="0">
<script type="text/javascript" src="sw.js"></script>
<div id="flashplayer"><a href="http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player.exe">Video izlemek için programı indirin Flash Player</a> to see this player.</div>
<script type="text/javascript">
<!--
var object = new SWFObject("mediaplayer.swf", "mediaplayer", "425", "344", "7");
object.addParam("allowfullscreen", "true");
object.addVariable("width", "425");
object.addVariable("height", "344");
object.addVariable("autostart", "true");
object.addVariable("file", encodeURIComponent("<?php echo "http://www1.bpcd.net/cgi-bin/nph-proxy.cgi/000000A/http/www.youtube.com/get_video.php?video_id=".$v . "&t=".$t . "&.flv";?>"));
object.addVariable("type", "flv");
object.addVariable('backcolor','0x000000');
object.addVariable('frontcolor','0x808080');
object.addVariable('lightcolor','0xCCCCCC');
object.write("flashplayer");
-->
</script>
<?php
mysql_free_result($sonyazilar);
mysql_free_result($yorumlar);
mysql_close();?>