Jump to content

MySQL PHP RSS Syndication


Recommended Posts

Guest Xanza

Hey guy's, it's been a while since I've been here, but I'm in a real pickle here!

 

I currently own and run vBulletin forums, but that's however irrelevant; but I told you that to tell you this! I'm trying to create an RSS system in which each of my users can have their own feed. I've tried to accomplish this via PHP/MySQL.

 

One of the main challenges is I need to grab information from vBulletin meaning the script to add/create feed's and feed items will have to be run within vBulletin. It's already pretty tricky right there.

 

The next tricky part is I really have no experience in MySQL Feeds, or RSS technology. But basically what I want to do is have a form located in my vBulletin installation in which my users can visit to 'create' rss feeds. My boards have over 79,000 members, so I need to have each user have their own table in my database. The structure is as follows.

 

 

-rss
--{vBulletin UserID}
---id
---title
---description
---url

 

As you can see that part is pretty easy. However this is where things start to go crazy. I've decided I'm going to be using $_POST variables between forms to carry the information between form 1 and form 2 and so on.

 

$title = $_POST['title'];
$desc = $_POST['description'];
$url = $_POST['url'];
$userid = $_POST['userid'];

 

Still pretty simple; however:

 

$update_feed = "INSERT INTO $userid (`id`,`title`,`description`,`url`) VALUES("",".$title.",".$description.",".$url.")";

$create_feed = "CREATE TABLE `$userid` (
   `id` int(11) not null auto_increment,
   `title` text CHARSET utf8,
   `description` text CHARSET utf8,
   `url` text not null,
    PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3;";

 

My $update_feed is going to be attached to a form in which users can add to their RSS feed, I have yet to create one in which they may delete them from their account.

 

the $create_feed is just like it sounds, it adds a table to my main database using the users vBulletin userid. Now that I've gotten this far, I can't figure out for the life of me how to make it so the user can visit: http://site.com/feeds/{user_id}.php and be able to have their feed displayed.

 

Is there anyone willing to help? MySQL client version: 4.0.21

Link to comment
https://forums.phpfreaks.com/topic/197823-mysql-php-rss-syndication/
Share on other sites

Guest Xanza

Well the actual problem with that, that I have found; is I wouldn't know how to get each individuals feeds from the database. Not only that, my Forum has over 79,000 Users. :x If everyone signed up, I would have to sift through all those tables instead of having them all inside of one (if for any reason I needed to look at them).

 

But how would I go about doing it all in one table, just so I know?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.