View Single Post
Old 12-11-2007, 08:48 PM  
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
Quote:
Originally Posted by who View Post
Well I'm toying with a new idea for a website. But I suppose I'll have to keep digging. Thanks.
I was just curious what your data format looks like and what platform you were using. If you have a database but not platform, you can pretty much convert anything to an RSS feed. Fuck it, even text files could help. To keep it kind of non-geeky though, take the database schema below and my really shitty explanation

table: HookersIFucked
columns:
id: some primary key shit
name: stores text of hooker name
title: name of the night, i.e.: "Back of cab. Hooker hit cabby in head with condom"
description: how i laid the hooker in the back of a cab... blah blah blah.
myalias_thatnight: did she call you "don" or "rob"
date_i_laid_hooker: date of incident

Now, if you have a random database with a table populated with shit like above, you can take that data and format it to an RSS feed... Apologies again on my shitty explanation below as it's unusable in any situation:

<?php
$header=<<<EOQ
<rss version="0.91">
<channel>
<title>I'm a hooker fucker</title>
<link>http://www.ilikepie.com</link>
<description>Pie and hookers meet in an awesome experience.</description>
<language>en-us</language>
EOQ;

// get database results somehow
$results = $db->getHookersIFucked();

// create string to spit to browser
$string = "";
while($results = $hookerIFucked)
{
$string.=<<<EOQ
<item>
<title>$hookerIFucked->getTitle()</title>
<link>http://www.ilikepie.com/$hookerIFucked->getId()/</link>
<description>$hookerIFucked->getDescription()</description>
</item>
}
$string.=<<<EOQ
</channel>
</rss>
EOQ;

header("Content-Type: text/xml");
echo $string;
exit;
?>

------------
k. probably all bad advice so I'm leaving now. Sorry to bump with the above nonsense.
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote