• 24-06-2017, 19:13:44
    #1
    merhaba arkadaşlaryeni bir site açtık bot ile çektiyim filmlerin afişlerini öne çıkarılmış görsel olarak eklemem gerekiyor ama ne yaptıysam ne etrdiysem bi türlü yapamadım
    Kaydet.php Dosyası burada
    <!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=windows-1254" />
    <META NAME="ROBOTS" CONTENT="NOINDEX,NOFOLLOW"></head>
    <body>
    <?
    
    
    
    $des=$_POST['des'];
    $seoanahtar=$_POST['seoanahtar'];
    $embed2=$_POST['embed2'];
    $film=$_POST['film'];
    $v_adis=$_POST['name'];
    $adi_s=$v_adis;
    $v_etiket=$_POST['etiket'];
    $rik=$_POST['resim'];
    $ne="".$adi_s."";
    $filmad=$_POST['orjinalad'];
    $embed1=$_POST['embed1'];
    $embed4=$_POST['embed4'];
    $embed3=$_POST['embed3'];
    $embed2=$_POST['embed2'];  
    
    $aciklama = "<!--part:720-->$embed1
    
    <!--nextpage--><!--part:480-->$embed2
    
    <!--nextpage--><!--part:OK RU-->$embed3
    
    <!--nextpage--><!--part:OK RU-->$embed4";
    $dkk = array("45 Dkk","58 Dkk","39 Dkk","43 Dkk","55 Dkk");
    //film kalitesi seçme
    
    $degisken = array("720p","1080p","480p");
    $sayi= rand(0,count($degisken)-1); 
    $fkalite = $degisken[$sayi];
    
    //film süresi yazma
    $dkk = array("45 Dkk","58 Dkk","39 Dkk","43 Dkk","55 Dkk");
    $sayim= rand(0,count($dkk)-1); 
    $otodkk = $dkk[$sayim];
    
    
    
    
    
    $ad = str_replace(' ', '-',$filmad);
    
    $linkcik= $rik; // Adres satirindan dosya yolunu aliyoruz ve degisekene atiyoruz. 
    
    // Bi kisimdan dosyamizi cekecek fonksiyona giris yapiyoruz.
    function dosya_indir($link,$name=null)
    {
    
    $link_info = pathinfo($link);  //Yol bilgilerini de?i?kene atyyoruz.
    $uzanti = strtolower($link_info['extension']); //Dosyanyn uzantysyny de?i?kene atyyoruz.
    $file = ($name) ? $name.'.'.$uzanti : $link_info['basename'];
    
    $yolcuk = "../../uploads/dizi/".$file; // Dosya/ buradan cektigimiz dosyanin kaydedilecegi yeri seciyoruz, sonunda / isareti olmak zorunda ve klasorun yazma izni (777) olmali.
    
    $curl = curl_init($link);
    $fopen = fopen($yolcuk,'w');
    
    curl_setopt($curl, CURLOPT_HEADER,0);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($curl, CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_0);
    curl_setopt($curl, CURLOPT_FILE, $fopen);
    
    curl_exec($curl);
    curl_close($curl);
    fclose($fopen);
    
    }
    
    
    dosya_indir($rik,$ad); // ilk satirda get metodu ile aldigimiz linki degiskene atamistik, burada url adresini ve bir onceki sayirda random sayimizi ekliyoruz, inecek dosyayi ve ismini belirliyoruz.
    
    // resim linki düzenleme
    $resiml = "dizi/".$ad.".jpg";
    
    $filename = "dizi/".$ad.".jpg";
    
    
    
    $icerik=str_replace($red,$ret,$v_content);
    $width="600";
    $height="400";
    $basla = array('/WIDTH=([0-9]+)/','/HEIGHT=([0-9]+)/','/height="([0-9]+)"/si','/width="([0-9]+)"/','/height=([0-9]+)/','/width=([0-9]+)/','/height:([0-9]+)/','/width:([0-9]+)/');
    $bitir = array('WIDTH='.$width.'','HEIGHT='.$height.'','height="'.$height.'"','width="'.$width.'"','height="'.$height.'"','width="'.$width.'"','height:'.$height,'width:'.$width);
    
    
    
    
    include "../../../wp-load.php";
    $my_post = array();
    $my_post['post_title'] = $v_adis;
    $my_post['post_content'] = "$embed3
    <!--nextpage-->
    $embed1
    <!--nextpage-->
    $embed2
    <!--nextpage-->";
    $my_post['post_status'] = 'publish';
    $my_post['post_author'] = 1;
    $my_post['tags_input'] = $v_etiket;
    $my_post['post_category'] = $_POST['kid']; //Kategorinizin idsini 8 olan yere yazınız.
    
    $post_id = wp_insert_post($my_post);
    add_post_meta($post_id, 'dizix_seodescription', $des); 
    add_post_meta($post_id, 'dizix_seokeywords', $seoanahtar); 
    add_post_meta($post_id, 'dizix_title', $v_adis); 
    add_post_meta($post_id, 'bolum', $_POST['bolum']); 
    add_post_meta($post_id, 'bolumadi', "Bilinmiyor"); 
    add_post_meta($post_id, 'dil', $_POST['dil']); 
    add_post_meta($post_id, 'sezon', $_POST['sezon']); 
    update_attached_file( $post_id, $resiml );
    
    //add_post_meta($post_id, 'embedler', $aciklama); 
    
    echo "Konunuz Eklendi";
    
    
    
    
    $sql = "insert into wp_posts(ID , post_content) values ('".$post_id."','".$aciklama."')";
    if (mysql_query($sql))
        echo "veriler eklendi";
    
    
    ?>
  • 27-06-2017, 14:20:12
    #2
    bu gonuda bilgisi olan arkadaş yokmu
  • 04-07-2017, 01:26:39
    #3
    hayla bi fikri olan yokmu