Webmaster in Japan

Life in Japan, technology and webmaster topics.

April 15, 2006

Simple Tutorials on Webmaster Stuff

Over at forum.weblamp.net the staff members started posting some simple guides to webmaster topics.

My own topic is on PHP Coding

It’s quite fun to do this in order to get people experimenting with things that they previously thought were maybe too difficult to get to grips with. My own tutorial is simple to read and try out the examples but will no dought stimulate a lot of curiosity in readers to explore further.

Filed under: Webmaster by blogmaster No Comments »

April 9, 2006

Revamping Websites

It’s very tempting to keep pursuing new ideas in search of the holy grail of internet wealth. This seems to be what most internet marketers seem to do. A bit like planting a seed and not watering it and caring for the plant until it is fully grown. Of course, you have to be able to tell when a site idea is going to work or not.
I almost fell into the same trap myself but thankfully I stuck with urgentclick.com Other sites I own tick over but I don’t have enough time to look after and develop them. Sites with high PR for example. When I look at what some webmasters are saying on forums, I realise I have some valuable sites on my hands since these people get almost no traffic and poor search engine ratings. Maybe they spend too much time on forums?

So what I’m trying to say is that if you have a good idea and your site is getting visitors, build on it. It takes time, but if each month is an improvement on the last, stick with it.

So I have been making steady improvements to my sites. With Urgentclick.com it started by finding out which pages were most visited and tidying them up. Then, I improved the site template based on my increased knowledge of php and css.

Now I’m at it again, improving my directory by replacing my simple php scripts with content management software. I’ve hacked this software to suit my requirements and fix some bugs. But it’s all about improving and tweaking what is working for me.

Here it is: http://urgentclick.com/directory/

It may look a bit freaky, but so what? I got bored with “professional-looking” sites.

Filed under: Webmaster by blogmaster No Comments »

April 7, 2006

Alien Registration

Today I went to the local municipal office to register my status as an Alien. I guess we foreigners look like we came from another planet? When I got my photos taken in an automatic booth I was told to wait 27 seconds for the photos to be printed - Japanese precision. Thankfully the photos were within the allowable +/-2mm tolerance after I snipped around them.
Alien Registration

After this I hovered across the river:

River Sai

And landed in the Giesha district:

Geisha Houses

I beamed inside one of the Geisha houses to take a look around:

Geisha Room

This is a tatami mat room where quests are entertained. Here is a close up of the cute room heater and drums they play:

Room Heater Drums

And the garden:

Japanese Garden

Next it was time to head home. Along the way I saw this strange-looking house. Note the clever use of concrete to guide visitors to the door:

Odd House

In the next couple of days, we are expecting the cherry blossoms to be in full bloom. Some people can’t wait and are starting to party and camp out by Kenrokuen park already :

Cherry Blossom Tents

p.s. if you are into Temples, Kanazawa has plenty (the green blobs on the map are locations of temples):

Temple Map

Filed under: Life in Japan by blogmaster 2 Comments »

April 5, 2006

Favicon Friends

Today I launched a new project that I had in my mind for a while now. A new way to link between sites in a fun manner using Favicons. I can imagine this becoming very popular and viral amongst the webmaster community.

urgentclick.com/favicon-friends/

Filed under: Webmaster by blogmaster No Comments »

Stop Hotlinking of Images

It used to be easy to do this via the .HTACCESS file with Apache web server hosting. The way it worked was to check the REFERER server variable which shows where the request for a file is coming from. So if it was not a page on your site or a trusted domain, then you could serve up a default image.

The code could be something like this:

Options +FollowSymlinks
# no hot-linking
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*png$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^(www\.)?yoursite\.com/ [NC]
RewriteRule (.*) img/default.gif
Some sites need the line: Options +FollowSymlinks
Others don’t.

What I found recently is that the HTTP_REFERER is not present when I browse with Firefox or IE6 so the above approach doesn’t work.

So it seems like there is no way to stop the hotlinking. But here is an alternative I settled on which works well:

Regularly change the name of your image directory. This is quick and easy to do with an FTP program and you don’t need to move any files. But, of course, you need to update the links to images in your web pages. So to make this quick and easy, you can use PHP to insert the new directory name in your links with echo _IMAGE_DIR;

Sorry I can’t enter php tags here without my blog thinking I’m entering code :P

Store the value of _IMAGE_DIR in an external file such as common.php containing:

define("_IMAGE_DIR", "images123/");

And include this file at the beginning of each web page with:

include(”common.php”);

Now it’s easy to change the path to your images regularly to stop hotlinkers wasting your bandwidth.

To display a default image in place of those that no longer exist, you can add this code to your .htaccess file:

Options +FollowSymlinks
RewriteEngine On
ErrorDocument 404 http://yoursite.com/image.gif

Here’s some links to people’s pages that know more than me about .htaccess:

http://www.vnwr.com/resources/tutorials/htaccess.html

http://altlab.com/htaccess_tutorial.html

http://www.alistapart.com/articles/hotlinking/

Filed under: Webmaster by blogmaster No Comments »

« Previous Page