Thursday 17 March 2016

Show Dynamic RSS Feed on Your Website

RSS (Really Simple Syndication) feeds offer a method for normal guests of your web site to remain knowing of your most up-to-date content. you'll begin a brand new RSS feed, betting on your website, through such places as Feedburner. guests will then add your RSS feed to their Google Reader or as a appliance on their iGoogle pages. you'll conjointly add your RSS feed to your own website to form an automatic suggests that to showcase your latest content. you'll conjointly use services like HootSuite to push your RSS feed bent on places like Twitter, Facebook and lots of alternative social networking sites.

The purpose of this text is to indicate alternative ways on a way to gift RSS feeds on your website. this could be a really effective thanks to offer recent content to your readers. The content doesn’t even essentially have to be compelled to be your own, you'll use feeds from totally different sites in addition, however it’s best to use relevant content to your website.

header("Content-Type: application/rss+xml; charset=ISO-8859-1");

// Include your normal database connection file
require("connectdb.inc.php");

$sql2 = "SELECT * FROM blog WHERE status = '1' ORDER BY blogID DESC";
$query =mysql_quert($sql2);

$rssfeed = '<?xml version="1.0" encoding="ISO-8859-1"?>';
$rssfeed .= '<rss version="2.0">';
$rssfeed .= '<channel>';
$rssfeed .= '<title>Fashion And Lifestyle Blog By Sonal Agrawal</title>';
$rssfeed .= '<link>http://www.pinkpeppercorn.in</link>';
$rssfeed .= '<description>A fashion and beauty blog that inspires readers to create the perfect wardrobe with essential styling tips by Sonal Agrawal</description>';
$rssfeed .= '<language>en-us</language>';

while($row=mysql_fetch_array($query)){
    $title=$row['blogTitle'];
    $link=$row['seoUri'];
    $description=$row['synopsis'];
  
    $rssfeed .= '<item>';
    $rssfeed .= '<title>' . $title . '</title>';
    $rssfeed .= '<description>' . $description . '</description>';
    $rssfeed .= '<link>http://www.example.in/blog/' . $link . '/'.$row['blogID'].'</link>';
    $rssfeed .= '<pubDate>' . date("D, d M Y H:i:s O", strtotime($row['dateAdded'])) . '</pubDate>';
    $rssfeed .= '</item>';  
}
    $rssfeed .= '</channel>';
    $rssfeed .= '</rss>';

   echo $rssfeed;

Friday 4 March 2016

Get Category and Subcategory Hierarchy From Ebay

You can get the updated category and subcategory list from Ebay !

  • Create the application on http://developer.ebay.com
  • Generate the Appid
  • Copy Appid and paste below
NOTE :-
$url= 'http://open.api.ebay.com/Shopping?callname=GetCategoryInfo&appid=APPID&siteid=203&CategoryID=-1&version=729&IncludeSelector=ChildCategories';
    $sXML = download_page($url);
    $oXML = simplexml_load_string($sXML);
    $cat_id=array();
    foreach($oXML->CategoryArray->Category as $category)
    {
        if($category->CategoryID!="-1")
        {
            $category->CategoryName;
            $category->CategoryID;
        }
    }