• 15-06-2009, 22:42:20
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    < img src="/resimler/haber/resim.JPG" alt="" align="left" onError="this.src='/resimler/haber/resimyok.gif';" class="haber-resim" />

    resim adresini nasıl alınıcak resim.JPG

    preg_match("#<div><img src=(.*?)<\/div>#i",$content,$image);



    <DIV style="LINE-HEIGHT: normal"><STRONG>burayıııııııı</STRONG></DIV> <DIV style="LINE-HEIGHT: normal">burayııııııııdaaaa<BR><BR>ve buraları</DIV>

    bi ip örnek verebilirmisiniz


    preg_match("#<DIV style=(.*?)<\/DIV></div>#i",$content,$detail);

  • 15-06-2009, 23:06:03
    #2
    preg_match("#< img src=\"/resimler/haber/(.*?)\"#si",$content,$image); // resimi aldık
    
    preg_match("#<DIV style=\"LINE-HEIGHT: normal\"><STRONG>(.*?)</STRONG></DIV> <DIV style=\"LINE-HEIGHT: normal\">(.*?)<BR><BR>(.*?)</DIV>#si",$content,$detail); //verileri çektik
    
    print_r($image);
    print_r($detail);
  • 16-06-2009, 23:17:33
    #3
    teşekkürler

    cekmek istediğim sayfa bu

    http://www.buyuk-tire.com/resimler/yazdir.asp?haber=850

    http://www.buyuk-tire.com/resimler/yazdir.txt

    başlığı resimi cekiyorum

    haber metnini cekemiyorum




    <font size="1" face="verdana"><%=strHaberMetni%></font>





    preg_match("#<font size=\"1\" face=\"verdana\">(.*?)<\/font>#i",$content,$detail);
  • 17-06-2009, 00:07:34
    #4
    Böyle denedin mi?
    preg_match("#\<font size=\"1\" face=\"verdana\">(.*?)\<\/font>#si",$content,$detail);
    Edit : Linkleri vermen uygun olmayabilir
  • 20-06-2009, 23:39:25
    #5
    <h3>bu aradaki yazıları nası alıcam </h3> cok fazla istenmeyen kod var bunları nası temizlerim sadece haberi alabilirim

    TİRE ÜLKÜ OCAĞINDA GÖREV DEĞİŞİMİ YAPILDI


    preg_match("#<h3>(.*?)<\/h3>#i",$content,$detail);

    alıyor ama <h3></h3> arasında başka kod yoksa alıyor

    not yapmak istediğim mydesgn haber sisteminden oluşan haber sitemin niziprehber sistemine tamamen gecirmek yanı başka yol bulamadım
  • 21-06-2009, 23:52:18
    #6
    Üyeliği durduruldu
    aponal adlı üyeden alıntı: mesajı görüntüle
    <h3>bu aradaki yazıları nası alıcam </h3>
    $data = explode("<h3>",$data);
    $data = $data[1];
    $data = explode("</h3>",$data);
    $data = $data[0];
  • 23-06-2009, 22:36:03
    #7
    sdemirkeser adlı üyeden alıntı: mesajı görüntüle
    $data = explode("<h3>",$data);
    $data = $data[1];
    $data = explode("</h3>",$data);
    $data = $data[0];
    bunları nası kullanıcamı küçük i örnek verebilirmisin
  • 24-06-2009, 01:48:06
    #8
    Üyeliği durduruldu
    aponal adlı üyeden alıntı: mesajı görüntüle
    bunları nası kullanıcamı küçük i örnek verebilirmisin
    data değişkeni yerine $content değişkeninizi kullanirsaniz biraz daha açık olur saniirm
  • 24-06-2009, 21:57:54
    #9
    bu şekilde yerleştirdim

    <?php
     
     
    ##
    # * @author dnmtnk 4378268530
    # * @copyright 2008-10-20
    ## 
    # Buffer
    # -------------
    ob_start();
    # Database Ayarları
    # --------------------
    $db['host'] = '';
    $db['user'] = '';
    $db['pass'] = '';
    $db['dbnm'] = '';
    # Mysql'e Bağlan
    # ----------------
    mysql_connect($db['host'],$db['user'],$db['pass']) or die(mysql_error().' Mysql Bağlantı Hatası');
    mysql_select_db($db['dbnm']) or die(mysql_error().' Mysql Veritabanı Seçme Hatası');
    # Hedef Site Ayarları
    # ----------------------
    $site = 'http://www.buyuk-tire.com/resimler/yazdir.asp?haber=';
    # Başlangıç ve Bitiş ID
    # ------------------------
    $id = (!$_GET['id'] ? '1' : $_GET['id']);
    $sonid = 883;
    # Bekleme Süresi
    # ---------------
    $bekle = 0;
    # Bilgileri Oku
    # ----------------
    function getData($url)
    {
        $ch = curl_init();
        curl_setopt($ch,CURLOPT_URL,$url);
        curl_setopt($ch,CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
        curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
        $content = curl_exec($ch);
        curl_close($ch);
        return $content;
     
     
     
    }
    # Mp3 Başlığı Al
    # ------------------
    function getMp3NameAndUrlAddress($content)
    {
       
       
    $veri = '<a>1</a>'; 
    $ver = '<p>Y</p>'; 
    
    preg_match("#<a>(.*?)<\/a>#i",$veri,$cid);
     
    
    preg_match("#<title>(.*?)<\/title>#i",$content,$title);
    preg_match("#<title>(.*?)<\/title>#i",$content,$cuff);
    
    preg_match("#<h2>(.*?)<\/h2>#i",$content,$spot);
     
    preg_match("#<table class=\"MsoNormalTable\" style=\"\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">(.*?)<\/tbody></table>#si",$content,$detail);
     
     
    preg_match("#<p>(.*?)<\/p>#i",$ver,$cuff_view);
     
     
    
    preg_match("#<h4>(.*?)<\/h4>#i",$content,$image);
     
    $content = explode("<h3>",$content);
    $content = $content[1];
    $content = explode("</h3>",$content);
    $content = $content[0];
     
     
     
     
        return array(
    'title' => $title[1],
    'cid' => $cid[1],
    
    'cuff' => $cuff[1],
    'spot' => $spot[1],
    'detail' => $detail[1],
    
    'image' => $image[1],
          
     
    
    'cuff_view' => $cuff_view[1]
     
     
    
        );
     
     
    
    }
     
     
     
     
    
    # Gelen Bilgileri Kaydet
    # -------------------------
    function saveData($title,$cid,$cuff,$spot,$detail,$image,$cuff_view)
    {
      $title = mysql_real_escape_string($title);
     $cid  = mysql_real_escape_string($cid);
      $cuff = mysql_real_escape_string($cuff);
     
      $spot  = mysql_real_escape_string($spot);
      
    
      $detail  = mysql_real_escape_string($detail);
      $image  = mysql_real_escape_string($image);
     
      $cuff_view  = mysql_real_escape_string($cuff_view);
     
    mysql_query("SET NAMES 'latin5'");
    
        $addToSql = mysql_query("INSERT INTO news(title,cid,cuff,spot,detail,image,cuff_view) VALUES ('".$title."','".$cid."','".$cuff."','".$spot."','".$detail."','".$image."','".$cuff_view."')");
     
     
     
     
     
        if ($addToSql !== false)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
    # Başlatma Fonksiyonu
    # ---------------------
    function Start()
    {
        global $site,$id,$sonid,$bekle;
        $getContent = getData($site.$id);
        $news = getMp3NameAndUrlAddress($getContent);
        if ($id != $sonid)
        {
            if (trim($news['title']) == '-')
            {
                $id++;
                header('Refresh:'.$bekle.' url='.$_SERVER['SCRIPT_NAME'].'?id='.$id);
                echo '<h1>'.$id.' Numaralı Kayıt Sitede Yok. Bir Sonrakine Geçiliyor...</h1>';
            }
            else
            {
              
    if (saveData($news['title'],$news['cid'],$news['cuff'],$news['spot'],$news['detail'],$news['image'],$news['cuff_view']))
                {
                    $id++;
                    header('Refresh:'.$bekle.' url='.$_SERVER['SCRIPT_NAME'].'?id='.$id);
                    echo '<h1>'.$news['title'].'-'.$news['cuff'].'-'.$news['spot'].'-'.$news['detail'].'-'.$news['image'].' Kaydedildi. Bir Sonrakine Geçiliyor...</h1>';
                }
                else
                {
                    header('Refresh:'.$bekle.' url='.$_SERVER['SCRIPT_NAME'].'?id='.$id);
                    echo '<h1>'.$news['title'].'-'.$news['cuff'].'-'.$news['spot'].'-'.$news['detail'].'-'.$news['image'].' Kaydedilemedi. Yeniden Deneniyor...</h1>';
                }            
            }
        }
        else
        {
            echo '<h1>Pempe Mp3 Sitesi Bilgileri Alındı.</h1>';
        }
    }
    # Başla
    # -------------
    Start();
    # Buffer End
    # ----------------
    ob_end_flush();
    ?>