Навигация

Навигация

Навигация

Скачать песни евровидения 2011,секреты контакта,статьи о электромобилях

   
    


Полезные  ссылки только для вас        я думаю пригодятся  
         http://camil-v.narod.ru/ - инфосайт
             www.camil-v.narod.ru/games/er3.htm - игры - номинанты на звание игра года
                  www.camil-v.narod.ru/super/er3.htm - развлечения
                       www.camil-v.narod.ru/music/music.htm- музыка Ариии
                                                                                                     


                       Е ВРОВИДЕНЬЕ  2011 - http://camil-v.narod.ru/eurovision/index.html - видео,информация с конкурса

                  


 

Статьи о электромобилях:

  •                                 
  •                         
  •                        Лушие песни евровиденья 2009
  • AySel & Arash - http://www.320kbit.net/pages/2/264.html             Inga & Anush       Arshakyans-  
  •          Kejsi Tola  - http://www.320kbit.net/pages/1/132.html             http://www.320kbit.net/pages/2/234.html                                                                                        
  •                             Susanne Georgi-                                        http://www.320kbit.net/pages/2/229.html                                                                                                   

    •                                                                                                                                                                                                                             Malena Ernman - http://www.320kbit.net/pages/3/325.html
    •                                         
    •                                                               Alexander Rybak - http://www.320kbit.net/pages/2/263.html
                                 Inga & Anush Arshakyans - http://www.320kbit.net/pages/2/234.html
                                                                        Остальные  песни вы найдете:      
                                                           http://www.320kbit.net/eurovision/
                   
            мультимедиа                        Все  секреты    vkontakte.ru                    
                      Список сайтов поддерживающих интернет радио..                                                    

       
                                                                             
     
                   онлайн радио                                     интересные  новости  радио                       радио через мобильные телефоны
     

     
                                  

                                              Обновление заголовков новостей с другого сайта
                                                    или  как установить RSS себе на сайт
     
     
       
     
      Сначала установите себе парсер RSS. Есть много разных каждый со своими преймуществами. Вот например неплохой парсер с использованием cURL который в тоже время легко перенастраивается на использование функций file_get_contents() и fopen() в случае если ваш хостинг не поддерживает cURL
    Преймущество его заключается в возможности парсить сразу несколько фидов.

    Копируете код и сохраняете файл parse.php в один каталог с вашей страницей на которой собираетесь разместить данные из RSS

    <?php

    class rssReader {
    var $rssFeeds;

    // Class constructor
    function rssReader() {

    // Here are the feeds - you can add to them or change them
    $this->rssFeeds = array(
    0 => "Вставляете сюда ссылку вашего RSS фида",
    1 => "Второй фид",
    2 => "Третий",
    3 => "Четвертый",
    4 => "Пятый и.т.д",//По аналогии копируете строчку и вставляете сколько угодно ссылок на фиды
    );
    }

    function checkCache($rss_url) {

    $ttl = 60*60;// 60 secs/min for 60 minutes = 1 hour(360 secs)
    $cachefilename = md5(md5($rss_url));

    if (file_exists($cachefilename) && (time() - $ttl < filemtime($cachefilename)))
    {
    //$feed = file_get_contents($cachefilename);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $cachefilename);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $feed = curl_exec($ch);
    curl_close($ch);
    }
    else
    {

    //$feed = file_get_contents($rss_url);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $rss_url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $feed = curl_exec($ch);
    curl_close($ch);

    // $fp = fopen($cachefilename, 'w');

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $cachefilename);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $data = curl_exec($ch);
    curl_close($ch);

    //$xmldata = split("\n",$xmldata);

    //foreach ($xmldata as $data);
    //fwrite($data, $feed);
    //fclose($data);
    }
    return $feed;

    }

    //
    // Creates HTML from a FeedID in the array
    // it makes $howmany entries
    //
    function createHtmlFromFeed($feedid, $howmany) {

    // Now we make sure that we have a feed selected to work with
    $rss_url = $this->rssFeeds[$feedid];
    if (!isset($rss_url)) $rss_url = $this->rssFeeds[$feedid];
    $howmany = intval($howmany);

    $this->createHtmlFromRSSUrl( $rss_url, $howmany );

    }

    //
    // Create HTML from an RSS URL
    // it makes $mowmany entires
    //
    function createHtmlFromRSSUrl( $rss_url, $howmany )
    {
    // Now we get the feed and cache it if necessary
    $rss_feed = $this->checkCache($rss_url);

    // Now we replace a few things that may cause problems later
    $rss_feed = str_replace("<![CDATA[", "", $rss_feed);
    $rss_feed = str_replace("]]>", "", $rss_feed);
    $rss_feed = str_replace("\n", "", $rss_feed);

    // If there is an image node remove it, we aren't going to use
    // it anyway and it often contains a <title> and <link>
    // that we don't want to match on later.
    $rss_feed = preg_replace('#<image>(.*?)</image>#', '', $rss_feed, 1 );

    // Now we get the nodes that we're interested in
    preg_match_all('#<title>(.*?)</title>#', $rss_feed, $title, PREG_SET_ORDER);
    preg_match_all('#<link>(.*?)</link>#', $rss_feed, $link, PREG_SET_ORDER);
    preg_match_all('#<description>(.*?)</description>#', $rss_feed, $description, PREG_SET_ORDER);

    //
    // Now that the RSS/XML is parsed.. Lets Make HTML !
    //

    // If there is not at least one title, then the feed was empty
    // it happens sometimes, so lets be prepared and do something
    // reasonable
    if(count($title) <= 1)
    {
    echo "No news at present, please check back later.<br><br>";
    }
    else
    {
    // OK Here we go, this is the fun part

    // Well do up the top 3 entries from the feed
    for ($counter = 1; $counter <= $howmany; $counter++ )
    {
    // We do a reality check to make sure there is something we can show
    if(!empty($title[$counter][1]))
    {
    // Then we'll make a good faith effort to make the title
    // valid HTML
    $title[$counter][1] = str_replace("&amp;", "&", $title[$counter][1]);
    $title[$counter][1] = str_replace("&apos;", "'", $title[$counter][1]);
    $title[$counter][1] = str_replace("&pound;", "?", $title[$counter][1]);

    // The description often has encoded HTML entities in it, and
    // we probably don't want these, so we'll decode them
    $description[$counter][1] = html_entity_decode( $description[$counter][1]);

    // Now we make a pretty page bit from the data we retrieved from
    // the RSS feed. Remember the function FormatRow from the
    // beginning of the program ? Here we put it to use.
    $row = $this->FormatEntry($title[$counter][1],$description[$counter][1],$link[$counter][1]);

    // And now we'll output the new page bit!
    echo $row;
    }
    }
    }
    }

    function FormatEntry($title, $description, $link) {
    return <<<HTML
    <p class="feed_title">{$title}</p>
    <p class="feed_description">{$description}</p>
    <a class="feed_link" href="{$link}" rel="nofollow" target="_blank">Read more...</a>
    <p>&nbsp;</p>
    <hr size=1>
    HTML;
    }


    function GetrssFeeds() {
    return $this->rssFeeds;
    }

    function SetrssFeeds($rssFeeds) {
    $this->rssFeeds = $rssFeeds;
    }


    }// END OF THE CLASS

    ?>



    Далее на вашей странице:
    сначала в тег head вставляете вызов парсера:

    <?php
    include("parser.php");
    $myRSS = new rssReader();
    ?>

    Затем помещаете на нужные вам места на странице несколько тегов div и вставляете в каждый из них код:
    <?php
    $myRSS->createHtmlFromFeed(0,5);
    ?>
    В скобках первая цифра это номер фида (из файла parser.php), вторая - количество новостей из этого фида которые будут отображаться, в данном случае номер фида -0, новостей- 5.

    Далее по аналогии вставляете в другой div:
    <?php
    $myRSS->createHtmlFromFeed(1,5);
    ?>
    В этом случае будут отображаться 5 новостей из фида под номером 1.
    Можно также отображать данные из фида в виде вертикального скролла или горизонтального....для этого поищите в гугле скрипт типа rss feed ticker или rss feed scroller

    Все, пробуйте, обязательно получится.
     
     
                                                                                                                      
                                          java scripty - самые полезные и нужные                                                                  
     
        
                                     ttp://www.a1javascripts.com/
                                     tp://www.chat.ru/~basil/index.htm
                                     tp://www.dewia.ru/
                               Внимание  ! Все для создания web сайтов
                 http://web-master.agava.ru/
       
     

    Статьи о электромобилях:

     
     

    Скачать антивирус касперского