+ Reply to Thread
Results 1 to 7 of 7

Thread: Build RSS Channel

  1. #1
    gptsven is offline x10 Lieutenant gptsven is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    253

    Build RSS Channel

    PHP Code:
    <?php 

    // CODE MAY BE SPREAD , leave in credits
    // Programmer : Contagious Aka Synbitz 
    // used on : http://www.webhost-choice.com
    include_once('../config.php');
    include_once(
    '../Functions/General.php');
    header("Content-Type: application/xml; charset=UTF-8");
    $query "SELECT *,DATE_FORMAT(date_added,'%a, %d %b %Y %T' ) AS added FROM hosts ORDER BY date_added DESC";
    DB_CONNECT($DB_FreeHosting,$DB_Host,$DB_User,$DB_Password);
    $result mysql_query($query) or die(mysql_error());
    DB_DISCONNECT();

    echo 
    '<?xml version="1.0" ?>';
    echo 
    '<rss version="2.0">';
    echo 
    '<channel>';
    echo 
    '<title>Webhost-Choice.com : Receive Updates on Free web hosting</title>';
    echo 
    '<description>This feed will keep you updated on recently added free hosts</description>';
    echo 
    '<link>http://www.webhost-choice.com</link>';
    echo 
    '<image>';
    echo 
    '<title>Webhost-choice.com</title>';
    echo 
    '<width>200</width>';
    echo 
    '<height>200</height>';
    echo 
    '<link>http://www.webhost-choice.com</link>';
    echo 
    '<url>http://www.webhost-choice.com/Graphics/Layout/Header-Logo.png</url>';
    echo 
    '</image>';
    while (
    $data mysql_fetch_assoc($result))
    {
    echo 
    '<item>';
    echo 
    '<title>'.$data['name'].'</title>';
    echo 
    '<description>Added on '.$data['added'].'</description>';
    echo 
    '<link>http://www.webhost-choice.com/freehost-package-details/'.$data['id'].'-'.$data['name'].'/</link>';
    echo 
    '</item>';
    }

    echo 
    '</channel>';
    echo 
    '</rss>';

    ?>
    Result : http://www.webhost-choice.com/RSS/freehostsrss.php

    Modify a couple of things and you get what ya need, your own little rss channel for any of your news pages/whatever lol

  2. #2
    Danielx386 is offline x10 Elder Danielx386 is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    Australia
    Posts
    698

    Re: Build RSS Channel

    Nice peice of code, what if I want to use the rss from wordpress?

  3. #3
    pikbos is offline x10Hosting Member pikbos is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    3

    Re: Build RSS Channel

    THANKS..
    nice post bro

  4. #4
    gptsven is offline x10 Lieutenant gptsven is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    253

    Re: Build RSS Channel

    no problem

  5. #5
    archdesun's Avatar
    archdesun is offline x10Hosting Member archdesun is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    29

    Re: Build RSS Channel

    ok thanks for all
    :drool:Nothing is absolute, Nothing is forever, Nothing from nothing :drool:

  6. #6
    sgecko is offline x10Hosting Member sgecko is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    2

    Thumbs up Re: Build RSS Channel

    Nice and simple!

    Thanks!!!

  7. #7
    gptsven is offline x10 Lieutenant gptsven is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    253

    Re: Build RSS Channel

    =] if you want any more help ill do it with pleasure

+ Reply to Thread

Similar Threads

  1. WOA! IRC?! 0.o What is THAT!?
    By David in forum Off Topic
    Replies: 6
    Last Post: 04-18-2009, 12:58 PM
  2. Replies: 28
    Last Post: 04-04-2008, 05:11 PM
  3. Great Tutorial On how to build your own PC
    By Loneua Technologies in forum Computers & Technology
    Replies: 8
    Last Post: 01-20-2008, 09:51 PM
  4. Replies: 6
    Last Post: 04-09-2006, 06:14 AM
  5. Free Tv !
    By minievan in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 03-25-2006, 12:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers