yakarbey adlı üyeden alıntı: mesajı görüntüle
Yardımcı Olacak Kimse Yokmu ????


Bu Kodları Düzeltecek Kimse Varmı ?

ChatLakTurk Video Script Facebook Botu

<?php
include("../ayar.php");
session_start();

if(!isset($_SESSION["login"])){

echo "Bu sayfayı görüntüleme yetkiniz yoktur.";

}else{

?>
<?
$vcek=$_GET['vcek'];
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Video script - Admin Paneli</title>
<link rel="stylesheet" type="text/css" href="admin.css" />
</head>

<body>
<div id="logo">
<img src="<?=$domain?>/<?=$yonetim?>/panel.png" />
</div>

<div id="govde">
<?php
include("menu.php");
?>
</div>
<div id="temizle"></div>
<div id="orta">
<H2>facebook botu</H2>
<?php 

function duzelt($kod)
{
    $eski[0]='u00253A'; $yeni[0]=':';
    $eski[1]='u00252F'; $yeni[1]='/';
    $kod=str_replace($eski,$yeni,$kod);
    return $kod;
}


if($_GET["vcek"]){
$url   = $vcek;    
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://login.facebook.com/login.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,'email='.urlencode($mail).'&pass='.urlencode($sifre).'&login=Login');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_COOKIEJAR,dirname(__FILE__)."/cookie.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE,dirname(__FILE__)."/cookie.txt");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://www.facebook.com");
curl_setopt($ch,CURLOPT_USERAGENT,"Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)");
curl_exec($ch);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://www.facebook.com");
curl_setopt($ch,CURLOPT_USERAGENT,"Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)");
$data = curl_exec($ch);
curl_close($ch);



$site   = urldecode($data);



preg_match_all('@<span class="mtm mbs mrs fsm fwn fcg">(.*?)</span>(.*?)<span class="mts fsm fwn fcg"@',$site,$m1);


$adi = strip_tags(trim($m1[2][0]));


$link = f('video_src", "','.mp4',$site);
$video = duzelt($link[0].'.mp4');
 
 




$resim = f('"thumb_url", "','"',$site);
$resim = $resim[0];
$resimm = duzelt($resim);



 $sure = f('<strong  class="video_length">','</strong>',$site); 
$sure = $sure[0];  


$title1 = explode('next&quot;);" href="http://www.facebook.com/photo.php?v=',$site);
$sonrakix = explode('&',$title1[1]);


$sonraki = "http://www.facebook.com/video/video.php?v=".$sonrakix[0]."";



$kategori=$_GET["kategori"]; 
$resim = duzelt($resimm); 




$sonuc = mysql_query("SELECT id FROM videolar WHERE adi='$adi' LIMIT 0, 1");
if( mysql_num_rows($sonuc) ){
echo $adi.' daha önceden kayıt edilmiş.<br>';
} else {
$ekle = mysql_query("Insert Into videolar (id,adi,kategori,link,resim,sure,hit,x) values ('','$adi','$kategori','$video','$resimm','$sure','0','')");
if($ekle){
echo("<font color=red>$adi videosu eklendi !!!</font><br>");
}
}

echo '<script>location.href="facebook-botu.php?vcek='. $sonraki .'&kategori='.$_GET["kategori"].'";</script>';


}else{
echo '
<form id="form1" name="form1" method="get" action="facebook-botu.php">
<table width="739" border="0" align="center" style="margin-top:5px;">
<tr>
<td width="289"><div align="right">video linki:</div></td>
<td width="480"><label>
<input name="vcek" type="text" id="kactan" size="100" value="facebook video linki"/>
</label></td>
 </tr>
 <tr>
<td width="289"><div align="right">Kategori:</div></td>
<td width="480"><label>
        <select name="kategori" id="kategori">'; ?>
        <?
                    $data = mysql_query("select * from kategoriler group by id");
                    while($sonuc = mysql_fetch_array($data))
                    {
                    $id=$sonuc["id"];
                    $kategori=$sonuc["kategori"];
                    ?>
                    <option value="<?php echo $kategori; ?>"><?php echo $kategori; ?></option>
                    <?
                    }
                    ?>       
<?php        
       echo '</select>
      </label></td>
 </tr>
';
echo '
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input type="submit" name="Ekle" id="Ekle" value="Video(ları) ekle" />
      </label></td>
    </tr>
  </table>
</form>
';


}

?>
</div>

</body>
</html>
<?php

}


?>