display wordpress post on remote php website

Solution:1

WordPress provide function to fetch remote data. So you can use that.see below code

$feedUrl = 'http://project.demotestserver.com/brand_new/feed';
$data = wp_remote_retrieve_body(wp_remote_get($feedUrl, array( 'timeout' => 30000 ) ));
$dom = new DOMDocument;
$dom->loadXML($data);
if (!$dom) {
    echo 'Error while parsing the document';
    exit;
}
$xml = simplexml_import_dom($dom);
$posts = $xml->channel->item;
    $i=0;
    foreach($posts as $key => $post) {
       if($i>=3) continue;
        $title=$post->title;
        $i++;

    }

   print_r($title);

Solution:2

Use following code

<?php
$feed = 'http://rss.slashdot.org/Slashdot/slashdot';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $feed);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);

//print_r($data);

$xml = new SimpleXMLElement($data);
foreach ($xml->channel->item as $i) {
    echo $i->title . PHP_EOL;
}
?>

$ php ~/tmp/so/php-feed/smple.xml.php 
Should Newsweek Have Outed Satoshi Nakamoto's Personal Details?
Stanford Team Tries For Better Wi-Fi In Crowded Buildings
Computer Program Allows the Blind To "See" With Sound
(...)

Your URL is not working because:

$ curl -D-  http://project.demotestserver.com/brand_new/feed 
HTTP/1.1 301 Moved Permanently
(...)
Location: http://project.demotestserver.com/brand_new/feed/

You can check the headers with PHP-curl too, check the docs.