Saturday, December 19, 2015

how to create RSS Feed


<?php echo '<?xml version="1.0" encoding="UTF-8" ?>';?>
 <rss version="2.0">
    <channel>
        <title>BhojpuriTrain.com</title>
        <description>Free Bhojpuri song download</description>
        <link>http://bhojpuritrain.com</link>      
       
        <item>
            <title>BhojpuriTrain.com</title>
            <description>Watch PK2 Comedy Short Film directed by SRikanth Reddy PK2 is a hilarious Hindi short film spoof</description>
            <link>http://bhojpuritrain.com/player.php?v=LHu3_CXEdJY</link>
            <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>  
        </item>
       
        <item>
            <title>A 2 year old cute kid Dugu answering the quote answer</title>
            <description>Must watch how this cute boy answering</description>
            <link>http://bhojpuritrain.com/player.php?v=od0YNytKPCo</link>
            <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>  
        </item>
                       
        <item>
            <title>a very cute dance by village boy</title>
            <description>must see how a little kid dancing</description>
            <link>http://bhojpuritrain.com/player.php?v=didoFn8Erf0</link>
            <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>  
        </item>      
       
    </channel>
</rss>

Friday, December 18, 2015

PHP Tutorials Dynamic RSS Feed For Your Website Content Part 3 3

PHP Tutorials Dynamic RSS Feed For Your Website Content

Thursday, December 17, 2015

Make Download link and force to download on browser using PHP

$name  = $_GET['name'];
$fname = $_GET['file_name'];

$dir_path  = __DIR__.'/../uploads/';

header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header("Content-Disposition: attachment; filename=\"" . $name . "\";");
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($dir_path.$fname));
ob_clean();
flush();

readfile($dir_path.$fname);
exit;