Could really use some help. Trying to get a google script and honestly even a facebook rss to work. I have replaced all the relevant information in mine including ("localhost","username","password","database") but keep getting xml error. XML Parsing Error: undefined entity
Location: https://www.thedragonskeep.net/storeya_feed.php
Line Number 118419, Column 57: <p>Walking into the Kathmandu production center’s reception you are immediately greeted by a cheerful ‘Namaste’ (‘I Salute the God Within You’) with hands pressed together in a prayerful expression. Proceeding into any of the production halls you’ll be greeted by a complete chorus of the same as dozens of ladies press felt into a variety of shapes, while others stitch, needle and applique to finish hundreds of different styles of decorative items for export.</p>
Is there anyway to program xml santize into this code. Any help would be extremely appreciated. I tried to do the storeya one and get error too but that one just doesn't produce a feed. Code is below.
Thanks
Sandria
-----------------------------------------------------------------------------^
PHP Code:
<?php $conn=mysqli_connect("localhost","username","password","database");
if (mysqli_connect_errno($conn))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$q = mysqli_query($conn,"SELECT * FROM zen_products_description");
header("Content-type: text/xml");
echo '<?xml version="1.0"?>
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
<channel>
<title>yourwebsite.com</title>
<link>http://yourwebsite.com</link>
<description>Google Merchant Feed</description>';
while($r = mysqli_fetch_array($q))
{
$theid=htmlentities($r['products_id']);
$q2 = mysqli_query($conn,"SELECT * FROM zen_products WHERE
products_id='$theid' ");
while($r2 = mysqli_fetch_array($q2))
{
$mcid=htmlentities($r2['master_categories_id']);
$qdd4 = mysqli_query($conn,"SELECT categories_name, categories_id FROM
zen_categories_description WHERE categories_id='$mcid' ");
while($ddr4 = mysqli_fetch_array($qdd4))
{
$category=htmlentities($ddr4['categories_name']);
}
$image=htmlentities('https://yourwebsite.com/images/');
$image.=htmlentities($r2['products_image']);
$mid=$r2['manufacturers_id'];
$q3 = mysqli_query($conn,"SELECT * FROM zen_manufacturers WHERE
manufacturers_id='$mid' ");
while($r3 = mysqli_fetch_array($q3))
{
$brand=htmlentities($r3['manufacturers_name']);
}
$gtin=htmlentities($r2['products_model']);
$mpn=htmlentities($r2['products_model']);
$price=htmlentities($r2['products_price']);
if ($r2['products_quantity'] > 0){$availability='in
stock';}else{$availability='out of stock';}
}
$title=htmlentities($r['products_name']);
$link=htmlentities('http://yourwebsite.com/index.php?main_page=product_info&cPath=776&products_id=');
$link.=htmlentities($r['products_id']);
$description=htmlentities($r['products_description']);
$id=htmlentities($r['products_id']);
$condition='new';
echo "<item>
<title>$title</title>
<link>$link</link>
<description>$description</description>
<g:google_product_category>$category</g:google_product_category>
<g:id>$id</g:id>
<g:condition>$condition</g:condition>
<g:price>$price USD</g:price>
<g:availability>$availability</g:availability>
<g:image_link>$image</g:image_link>
<g:gtin>$gtin</g:gtin>
<g:brand>$brand</g:brand>
<g:mpn>$mpn</g:mpn>
<g:product_type>$category</g:product_type>
</item>";} ?></channel> </rss>
Version 1.55e too many plugins to count. Tried google feed but get server time out.
Bookmarks