[Site Home] [Forum Home] [Articles] [File DB] [News Archives]

IceTeks Changes -> RSS feed for home page news


(View original topic)


Red Squirrel - Jan-17-2004 server time
that will probably be impossible to find with no ads. But even if it has ads at least you'll have a host to learn it on and stuff.

brandon - Jan-17-2004 server time
Well, you can scrap that idea.

I found a few hosts that offer PHP/MySQL, but they have ads on them.

I was looking for a free one with no ads, that had support for them.

Red Squirrel - Jan-17-2004 server time
yeah it is a risk...

brandon - Jan-17-2004 server time
Well, it seems like it's not worth the risk to me.

Red Squirrel - Jan-17-2004 server time
It is. This site was down for a month because of that, and it could have been permanent.

brandon - Jan-17-2004 server time
Hmm, sounds very risky.

Red Squirrel - Jan-17-2004 server time
Yeah, it's hard at first but once you do it once it's easy. I'm saving up so I can build myself a LAN server. The problem with using an external server to host a site is that most isps don't allow that, so it's a one shot deal, if you get caught you have to take it down. I heard it's even stricter in the USA then canada with that. You usually get escorted by the FBI and stuff, but that's what I heard, have a hard time believing it's to that extent. I think the worse thing is an account suspension until you remove it, or something like that. But if it's on a LAN, it does not matter since only you can access it from the lan.

brandon - Jan-17-2004 server time
Are you talking about setting up a web-server on my PC????

I'll have to read-up on apache before I do that.

Red Squirrel - Jan-16-2004 server time
Yeah free ones are hard to find... that have php and mysql. I'm sure there must be some though. You can always setup your own server too.

brandon - Jan-16-2004 server time
If I ever have the time, and the attention span, I'll be sure to read your tutorial.

However, I'm only 16, so I can't really afford a host, and I can't find any good ones that support MySQL or PHP.

But I'll be sure to read them, because when I find that free-host that does offer that, then I will set-up an invision board there.

Red Squirrel - Jan-16-2004 server time
As in typing all that yourself? Yes and no. There's lot of repeat stuff I keep in text files and just copy and paste when I need it. For example, the whole mysql proceedure is saved in a text file called sql.txt or whatever in my programming folder, so I just copy and paste.

brandon - Jan-16-2004 server time
I won't have to hand-code will I????

Red Squirrel - Jan-16-2004 server time
QUOTE
Brandon, the hardest thing there is the PHP, and that's something I feel you could pick up on quickly enough.  Out of that PHP, most of it is just one function used again and again.


Yep, actually based on the two tutorials I have, you could easly pick up on that code. Basically what it does is pull out the 100 latest entries in the database and display them in the right format.

brandon - Jan-16-2004 server time
QUOTE (takahita_tsukino @ Jan 17 2004, 01:38 AM)
QUOTE
Brandon, the hardest thing there is the PHP, and that's something I feel you could pick up on quickly enough.  Out of that PHP, most of it is just one function used again and again.

Are you saying that to flatter me, or are you trying to say something else???

I have no clue when it comes to programming. I just know alot about computers.

Chris Vogel - Jan-16-2004 server time
QUOTE (Red Squirrel @ Jan 17 2004, 12:35 AM)
what's Hernia?

a protrusion of an organ or part through connective tissue or through a wall of the cavity in which it is normally enclosed -- called also rupture


Brandon, the hardest thing there is the PHP, and that's something I feel you could pick up on quickly enough. Out of that PHP, most of it is just one function used again and again.

Chris Vogel - Jan-16-2004 server time
Have you ever noticed how RSS is just one letter away from *that*? wub.gif

Someone remind me to implement this on my billion-hits-per-day site when it debuts, okay?

Red Squirrel - Jan-16-2004 server time
what's Hernia?

brandon - Jan-16-2004 server time
Let me rephrase that.

It'd be easier to get a Hernia.

Red Squirrel - Jan-16-2004 server time
lol, no math involve at all in this. em320.gif

I just added the date in the titles. Makes for a more convinient RSS experience. em320.gif Later on I might add more channels for new posts and stuff.

brandon - Jan-16-2004 server time
Yeah, it sure looks easy.

Maybe I should take up 311th grade math too.

Well, thanx for telling me Red.

Red Squirrel - Jan-16-2004 server time
It was pretty easy, for something that, yesterday, I did not know what it was. em317.gif the php was pretty easy too... actually this is the source code for it:

CODE

<?php
header("Content-type: application/rss+xml");
echo("<?xml version=\"1.0\" ?>\n");
?>
<rss version="2.0">

   <channel>

   <title>Outside Articles</title>
   <description>Various reviews and articles from around the tech globe!</description>
   <link>http://www.iceteks.com</link>




<?php

$sqlinfo = mysql_connect("localhost","iceteks_root","I_do_not_publicly_display_passwords");

$result = mysql_select_db("iceteks_frontpagenews",$sqlinfo);

$result = mysql_query("select * from main order by date desc limit 100;") or die("<font color=\"red\">SQL Error: " . mysql_error()."</font>");

$count = mysql_num_rows($result);


while($count>0)
{
$info = mysql_fetch_array($result);

$info[content] =  str_replace('<br>', '\n', $info[content]);
$info[link] =  str_replace('&', '&amp;', $info[link]);

$info[content] =  str_replace('&', '&amp;', $info[content]);
$info[title] =  str_replace('&', '&amp;', $info[title]);

$info[content] =  str_replace('’', '\'', $info[content]);
$info[title] =  str_replace('’', '\'', $info[title]);

$info[content] =  str_replace('‘', '\'', $info[content]);
$info[title] =  str_replace('‘', '\'', $info[title]);

$info[content] =  str_replace('£', '[euro]', $info[content]);
$info[title] =  str_replace('£', '[euro]', $info[title]);

$info[content] =  str_replace('“', '"', $info[content]);
$info[title] =  str_replace('“', '"', $info[title]);

$info[content] =  str_replace('”', '"', $info[content]);
$info[title] =  str_replace('”', '"', $info[title]);

$info[content] =  str_replace('®', '(R)', $info[content]);
$info[title] =  str_replace('®', '(R)', $info[title]);

$info[content] =  str_replace('™', '(TM)', $info[content]);
$info[title] =  str_replace('™', '(TM)', $info[title]);







?>

   <item>
   <title><?php echo($info[title]);?></title>
   <description><?php echo($info[content]);?></description>
   <link><?php echo($info[link]);?></link>
   </item>


<?php
$count--;
}


mysql_close($sqlinfo);
?>

   </channel>

   </rss>

Chris Vogel - Jan-16-2004 server time
Although I don't use RSS, I think it is wonderful. I'm glad we have it. smile.gif

So was it very simple? (The RSS, I mean. Not the PHP behind it.) It looks simple from what I've seen.

EDIT:
QUOTE
such as CNN

Actually, I don't think CNN provides feeds. sad.gif

Red Squirrel - Jan-16-2004 server time
I did not know what it was until I read this thread. Then I figured it would be cool to make my own. em320.gif

In short it's a standard way to view news without a browser. You can subscribe to news feeds such as CNN and get up to date stuff as it is added to the site.

brandon - Jan-16-2004 server time
What exactly is RSS????

Red Squirrel - Jan-16-2004 server time
Added a RSS feed for the home page news

http://www.iceteks.com/news/rssfeed.xml

Enjoy! cool.gif

(Showing 50 last posts, newest on top)