FeedForAll Forum Index  
 Home  •  FAQ  •   Search   •  Register   •  Profile   •  Log in
 grab feed addresses from a database and merge them? View next topic
View previous topic
Post new topicReply to topic
Author Message
cookie



Joined: 07 Jul 2007
Posts: 11

PostPosted: Mon Aug 13, 2007 6:21 am Reply with quoteBack to top

trying to create one feed by taking multiple feed addresses from a database and putting them in an array but its not working yet.

I have got this code thats is meant to do the above, i was just modifying the rssMesh_SampleConfig.php file and renamed it merge.php

<?php

$useOutputCaching = 0;
$outputCacheTTL = 3600; //cache files for 1 hour
$XMLTemplate = "rssMesh_Template.xml";
$sortOutputByPubDate = 1;

////////////////////////////
include '../config.php';
include '../dbconn.php';


$theuser = $_GET['theuser'];

$query1 = "SELECT * FROM users WHERE userid = '$theuser'";
$result1 = mysql_query($query1) or die(mysql_error());

// define the $feedList array
$feedList = array();

while($row1 = mysql_fetch_array($result1)){

$feedid = $row1['feedid'];

$getfeedinfo = "SELECT * FROM feedinfo WHERE ID ='$feedid'";
$feedinfo = mysql_query($getfeedinfo) or die(mysql_error());

while($feedinfocontent = mysql_fetch_array($feedinfo)){

$feedList[] = array(
'fileUrl' => $feedinfocontent['address'],
'itemCount' => 4
);
}
}

// $feedList has been populated !

$ConfigFilename = "DO_NOT_INCLUDE_CONFIG";
if (!isset($_REQUEST["buildConfig"])) {
@include_once("rssMesh.php");
}

?>

I keep getting this error:

XML Parsing Error: syntax error
Location: http://www.rss2facebook.com/thenews/merge/merge.php?theuser=555125157
Line Number 3, Column 1:Unable to open RSS Feed , exiting
^

i look at the source and its printing "Unable to open RSS Feed , exiting" 4 times which is how many records are in the database for the userID im testing,

Please help!
View user's profile
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Mon Aug 13, 2007 1:51 pm Reply with quoteBack to top

cookie wrote:
trying to create one feed by taking multiple feed addresses from a database and putting them in an array but its not working yet.

I have got this code thats is meant to do the above, i was just modifying the rssMesh_SampleConfig.php file and renamed it merge.php

<?php

$useOutputCaching = 0;
$outputCacheTTL = 3600; //cache files for 1 hour
$XMLTemplate = "rssMesh_Template.xml";
$sortOutputByPubDate = 1;

////////////////////////////
include '../config.php';
include '../dbconn.php';


$theuser = $_GET['theuser'];

$query1 = "SELECT * FROM users WHERE userid = '$theuser'";
$result1 = mysql_query($query1) or die(mysql_error());

// define the $feedList array
$feedList = array();

while($row1 = mysql_fetch_array($result1)){

$feedid = $row1['feedid'];

$getfeedinfo = "SELECT * FROM feedinfo WHERE ID ='$feedid'";
$feedinfo = mysql_query($getfeedinfo) or die(mysql_error());

while($feedinfocontent = mysql_fetch_array($feedinfo)){

$feedList[] = array(
'fileUrl' => $feedinfocontent['address'],
'itemCount' => 4
);
}
}

// $feedList has been populated !

$ConfigFilename = "DO_NOT_INCLUDE_CONFIG";
if (!isset($_REQUEST["buildConfig"])) {
@include_once("rssMesh.php");
}

?>

I keep getting this error:

XML Parsing Error: syntax error
Location: http://www.rss2facebook.com/thenews/merge/merge.php?theuser=555125157
Line Number 3, Column 1:Unable to open RSS Feed , exiting
^

i look at the source and its printing "Unable to open RSS Feed , exiting" 4 times which is how many records are in the database for the userID im testing,

Please help!


First RSSMesh doesn't access a database, you need use SQL2RSS.

I get an error just trying the above URL in a browser. There is something not right.

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
cookie



Joined: 07 Jul 2007
Posts: 11

PostPosted: Mon Aug 13, 2007 9:38 pm Reply with quoteBack to top

Im not trying to populate a feed with information from the database i am just grabbing a list of feed addresses from the database that will then be used in RSSmesh to push them all together. The feed addresses and array is being populated but the script isnt doing its job!

Please help!
View user's profile
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Tue Aug 14, 2007 5:51 am Reply with quoteBack to top

cookie wrote:
Im not trying to populate a feed with information from the database i am just grabbing a list of feed addresses from the database that will then be used in RSSmesh to push them all together. The feed addresses and array is being populated but the script isnt doing its job!

Please help!


The error you are getting isn't with your code, it is with the page that is returned. When I tried going there with a browser I get an error too.

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
cookie



Joined: 07 Jul 2007
Posts: 11

PostPosted: Tue Aug 14, 2007 6:02 am Reply with quoteBack to top

so is it an issue with RSSmesh? If so what is it? I am no xml expert.
View user's profile
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Tue Aug 14, 2007 6:07 am Reply with quoteBack to top

cookie wrote:
so is it an issue with RSSmesh? If so what is it? I am no xml expert.


I was wrong, it does seem to be your code. This is what is being produced:
Code:



Unable to open RSS Feed , exiting
Unable to open RSS Feed , exiting
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>rssMesh.php Sample Template</title>
        <description>A sample RSS feed template for rssMesh.php, http://www.FeedForAll.com/, by NotePage, Inc.</description>
        <link>http://www.FeedForAll.com/</link>
        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
        <language>en-us</language>
    <generator>FeedForAll-scripts (rssMesh.php), http://www.FeedForAll.com/, Copyright 2006-2007, NotePage, Inc.</generator>
<lastBuildDate>Tue, 14 Aug 2007 04:04:59 -0700</lastBuildDate>
<pubDate>Tue, 14 Aug 2007 04:04:59 -0700</pubDate>
</channel>
</rss>


You are going to have to do some debugging to see what is actually being done. You can edit your config file and add
Code:

$debugLevel = 3;


That should give you a clue about what is happening.

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
cookie



Joined: 07 Jul 2007
Posts: 11

PostPosted: Tue Aug 14, 2007 7:42 am Reply with quoteBack to top

aha that got me somewhere, its now printing the code out with some sort of diagnostic. its not making it any clearer to me.



Code:
DIAG: FeedForAll_scripts_readFile(rssMesh_Template.xml, 0, 0, -1)
DIAG: FeedForAll_scripts_contentOfCache(rssMesh_Template.xml, 0, -1, 0)
DIAG: FeedForAll_scripts_contentOfCache(): !useCaching
DIAG: FeedForAll_scripts_readFile(): return SUCCESSFUL
DIAG: FeedForAll_scripts_readFile(, 0, 1, -1)
DIAG: FeedForAll_scripts_contentOfCache(, 1, -1, 0)
DIAG: FeedForAll_scripts_contentOfCache(): file doesn't exist
DIAG: FeedForAll_scripts_contentOfCache(, 1, -1, 0)
DIAG: FeedForAll_scripts_contentOfCache(): file doesn't exist
Unable to open RSS Feed , exiting DIAG: FeedForAll_scripts_readFile(, 0, 1, -1)
DIAG: FeedForAll_scripts_contentOfCache(, 1, -1, 0)
DIAG: FeedForAll_scripts_contentOfCache(): file doesn't exist
DIAG: FeedForAll_scripts_contentOfCache(, 1, -1, 0)
DIAG: FeedForAll_scripts_contentOfCache(): file doesn't exist
Unable to open RSS Feed , exiting

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>rssMesh.php Sample Template</title>
        <description>A sample RSS feed template for rssMesh.php, http://www.FeedForAll.com/, by NotePage, Inc.</description>
        <link>http://www.FeedForAll.com/</link>
        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
        <language>en-us</language>
    <generator>FeedForAll-scripts (rssMesh.php), http://www.FeedForAll.com/, Copyright 2006-2007, NotePage, Inc.</generator>
<lastBuildDate>Tue, 14 Aug 2007 05:40:05 -0700</lastBuildDate>
<pubDate>Tue, 14 Aug 2007 05:40:05 -0700</pubDate>
</channel>
</rss>

[/code]
View user's profile
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Tue Aug 14, 2007 6:15 pm Reply with quoteBack to top

cookie wrote:
aha that got me somewhere, its now printing the code out with some sort of diagnostic. its not making it any clearer to me.



Code:
DIAG: FeedForAll_scripts_readFile(rssMesh_Template.xml, 0, 0, -1)
DIAG: FeedForAll_scripts_contentOfCache(rssMesh_Template.xml, 0, -1, 0)
DIAG: FeedForAll_scripts_contentOfCache(): !useCaching
DIAG: FeedForAll_scripts_readFile(): return SUCCESSFUL
DIAG: FeedForAll_scripts_readFile(, 0, 1, -1)
DIAG: FeedForAll_scripts_contentOfCache(, 1, -1, 0)
DIAG: FeedForAll_scripts_contentOfCache(): file doesn't exist
DIAG: FeedForAll_scripts_contentOfCache(, 1, -1, 0)
DIAG: FeedForAll_scripts_contentOfCache(): file doesn't exist
Unable to open RSS Feed , exiting DIAG: FeedForAll_scripts_readFile(, 0, 1, -1)
DIAG: FeedForAll_scripts_contentOfCache(, 1, -1, 0)
DIAG: FeedForAll_scripts_contentOfCache(): file doesn't exist
DIAG: FeedForAll_scripts_contentOfCache(, 1, -1, 0)
DIAG: FeedForAll_scripts_contentOfCache(): file doesn't exist
Unable to open RSS Feed , exiting

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>rssMesh.php Sample Template</title>
        <description>A sample RSS feed template for rssMesh.php, http://www.FeedForAll.com/, by NotePage, Inc.</description>
        <link>http://www.FeedForAll.com/</link>
        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
        <language>en-us</language>
    <generator>FeedForAll-scripts (rssMesh.php), http://www.FeedForAll.com/, Copyright 2006-2007, NotePage, Inc.</generator>
<lastBuildDate>Tue, 14 Aug 2007 05:40:05 -0700</lastBuildDate>
<pubDate>Tue, 14 Aug 2007 05:40:05 -0700</pubDate>
</channel>
</rss>

[/code]


The key is right here "Unable to open RSS Feed , exiting DIAG: FeedForAll_scripts_readFile(, 0, 1, -1)". That is saying there is no feed url being configured with your code.

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic


Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme