hoi iedereen,
ik heb het volgende probleem in mijn rss wordt maar een klein stukje weergegeven en in de broncode is mijn </link> rood iemand een idee hoe ik dit kan oplossen ?
Mvg ralph
<?
include_once('../inc/config.php');
include_once('../classes/MCAPI.class.php');
//header("Content-Type: application/xml; charset=UTF-8");
// create campaign
// defineer variabelen.
$cList = $_POST['cList'];
$cName = $_POST['cName'];
$cType = $_POST['cType'];
$cSubject = $_POST['cSubject'];
$cSender = $_POST['cSender'];
$cReply = $_POST['cReply'];
// get content
$cRawContent = file_get_contents($cUrl);
$cRawContent = str_replace("€", "€", $cRawContent);
preg_match_all($cFullPage, $cRawContent, $match);
// verwerk de content
$cProducts = array();
foreach($match[1] as $key => $cValue){
$product = array();
$cProductUrl = array();
// titel
preg_match_all($cNameRegExp, $cValue, $cName);
// images url
preg_match_all($cImageRegExp, $cValue, $cImageSrc);
// product url
preg_match_all ($cProductRegExp, $cValue, $cProductUrl);
//van prijs.
preg_match_all($cVanPrijsRegExp, $cValue, $cVanPrijs);
//voor prijs
preg_match_all($cVoorPrijsRegExp, $cValue, $cVoorPrijs);
// prijs exclusief btw werkt niet.
//preg_match_all($cExcBtwRegExp, $cValue, $cExcBtw);
$product['name'] = trim($cName[1][1]);
$product['img'] = trim($cImageSrc[1][0]);
$product['url'] = trim($cProductUrl[1][0]);
$product['vanPrijs'] = (double) trim($cVanPrijs[1][0]);
$product['voorPrijs'] = (double) trim($cVoorPrijs[1][0]);
//$product['prijsExcBtw']= (double) trim($cExcBtw[1][0]);
$cProducts[] = $product;
}
$cProductsXml="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<rss version=\"2.0\">
<channel>
<title>Herman Buitelaar</title>
<link> http://www.hermanbuitelaar.nl</link>
<description>Herman's acties!</description>
<pubDate>thu, 5 Sep 2013 15:55:58 +0000</pubDate>
<products>";
foreach($cProducts as $key => $value){
$cProductsXml .='
<product>
<name>'.$value['name'].'</name>
<images>'.$value['img'].'</images>
<url>'.$value['url'].'</url>
<vanPrijs>'.$value['vanPrijs'].'</vanPrijs>
<voorPrijs>'.$value['voorPrijs'].'</voorPrijs>
</product>
';
}
$cProductsXml .='</products></channel></rss>';
echo $cProductsXml;
?>
1.177 views