Archive for September, 2007

Full or partial RSS feed

Friday, September 14th, 2007

Choosing full or partial RSS feed has become a hot issue among web developers. Some said that RSS feed should be short, which mean is partially. It uses less bandwidth for delivering the feed content into visitor’s RSS reader. And then they can choose which news to read, hit the link and open up the page using their own web browser.

What’s wrong with this methode? Nothing’s wrong, unless you’re submitting your RSS feed into some planets or agregator. Thus your article will displayed partially and reduce your chance to be indexed by search engine.

But this method can give you statistic of your website’s reader, because they have to click to read full content of your article. You can see what topic they like most, which entry they like to read etc.

While using full RSS feed give you some advantages. The best to mention is your chance to be indexed is bigger than using partial RSS feed when you submit your RSS into planets or agregator. Also, it ease your visitor to read your article. They only need to look at their RSS reader and read all that. No need to click to save more bandwidth. Only content delivered, no ads, no banner, no images etc.

Talking about pay per view ads, using full RSS feed will reduce the chance of your page to be read. Thus, reduce your earning, may be.

So, decision is yours. You have to consider your audience, take a survey about their internet speed.

I myself prefer partial feed. I receive a short description of the article and click the only interesting article. Save my bandwidth, and save the author for I give him more income from his pay per view ads displayed on his homepage/blog. What about you?

You can also read a debate about using full or partial RSS feed.

Add friend in friendster without email nor last name

Monday, September 10th, 2007

FriendsterI’ve written a silly trick to add friend in Friendster without email address a long time ago. But this time I’m serious, a trick how to add friend in Friendster without email address or even last name. Seriously.

How it can be done?

Very simple. Just add your target’s friends first, as many as possible. Wait until your request to your target’s friend is approved. Then you can add your target as a friend without any difficulties. Sound great, eh?

Leave me a comment if you like my method ^_^

Old PHP script in register global = off environment

Wednesday, September 5th, 2007

My friend asked me how to run PHP scripts (which is written for register global = on environment) in a register global = off environment. Yeah, it’s a bad thing to write PHP script for register global = on environment, he just wanted his old scripts work with minimum efforts.

So I gave him a short script, which will regenerate variables from $_POST or $_GET. This script need to be placed onto the top of every single file which required variable from POST or GET method.

foreach($_POST as $key=>$value){
$$key = $value;
}
foreach($_GET as $key=>$value){
$$key = $value;
}
?>

Above script will, for example, generate variable named $username from $_POST['username'] with the same value.

Just remember to put above script in the top of your scripts, and remember NOT to write bad scripts.

Bad image cache in Internet Explorer

Wednesday, September 5th, 2007

Sometimes we need to upload/replace an image with the new one, using the same filename. Oftenly, our browser will display the same image as before we uploaded new image because they’re using the same name and browser just display image from cache. This could be nightmare!

I’ve tried some ways to prevent this bad caching done by the browser. Some only works for some browser and other don’t, mostly in Internet Explorer. Yeah, this browser has bad reputation with caching and I need a way to handle this problem.

Then I came into a conclusion that browser using filename to decide if it need to re-download the file or not. So I need to make a unique filename to call the same image, and it can be done using query string like filename.jpg?foo=bar or just filename.jpg?foo

To make the query string changed all the time, I use time() function in PHP. So to call an image, I will write:
User's avatar
and will changed time to time.

Amazingly this little trick solve all my caching problem!