Tuesday, December 20, 2005

[PHPExp] First Pet Project :)

Just picked up PHP after months of postponement.

Just not to dampen my learning mood too early, I started out with a simple pet project: A file listing page.

Have a look here: http://cardboardbox.felixleong.com/

It's not really something to scream about, it's just simple enough for me to let it auto generating a file listing for people to grab stuff from my cardboard box, which I use to dump temporary stuff for friends to download.

But it did took me about 4 nights to complete this 120+ lines of code. Most of the time spent is to avoid people from exploiting/compromising my script, especially the fact that I REALLY don't want my script to expose my root directories.

So essentially the checking I have done:
- get the absolute path of my cardboard box folder,
- obtain the requesting directory name from the user (if they typed it on the address bar) and translate it into another absolute path
- Compare the user's request absolute path and check against the cardboard box folder absolute path, to see whether the request looks within my cardboard box folder and no where else

But I'm starting to get the hang of PHP. I'm going to work on another PHP pet project of a larger scale now :).


In other news, I'm having plans to migrate this blog over to FelixLeong.com. I now have WordPress installed and configured at my server, now I'm still working on the theme for it. I'll announce once I got everything settled and moved.

[Edit: Fixed a couple of bugs just now ^-^"]

Friday, December 16, 2005

[TechnoRant] The Latest Eyesore Of The Web

Remember those days when webpage eyesore was the "in" thing? You know, over abundance of animated GIF, scrolling and blinking text, Comic Sans font everywhere, bad Flash splash pages, the "green text on red background"...

I know, I know, I admit that I did commit those "offenses" once, and learnt my lesson well. But just as I thought people learn how to do better web design this time round, this time we have an even worse eyesore: Webpage advertisements.

Somehow with the recent development that makes webmasters to put advertisements to earn a quick buck, it seems that these amatuers seems to have money blinded their artistic eyesight that they seem to throw great web design concepts out the window.

And more often than not, they seem to flood the whole page with advertisements that I thought that I just bumped into one of those badly maintained subway corridor walls cluttered with enough recyclable (and ugly) paperwork.

Really, somebody really have to kick those webmasters back to school to learn how to build a good, solid site.

Tuesday, December 13, 2005

[LinuxEXP] ADSL Modem/Streamyx Installation

Just get my ADSL router modem up and running. And to be honest, living without any provided manuals is definitely painful.

Anyway, long story cut short, here's the basic installation steps:
(*Note: I'm now using Aztech's DSL600E router modem, connecting to Streamyx)

  1. Connect the ADSL modem to the uplink port of the network switch (usually it's located at the extreme left/right port of the switch, which is usually labelled as "up" or something that is not numbered. Some better switches would have all its port capable of becoming an uplink port, like my ECOM switch)

  2. Connect your client (read: PCs) to the ports on the switch

  3. Configure your network settings to run on DHCP (can be done by accessing Fedora Core 4's menu: System Setting > Network. Click on your network card and edit its setting)

  4. IMPORTANT! This is different from configuring your Windows system: Configure your DNS setting to the DNS server IPs that your ISP provides. (For Streamyx, the DNS IP are [primary], [secondary])
  5. Configure your router setting, usually by accessing to its web interface (in Aztech DSL600E, the address is Installation and configuration information can be accessed here

  6. Execute Firefox and see whether you can surf away!

Note that to configure Windows, the DNS IP is the IP address of the router (in my case, Kinda strange why Windows and Linux behave so differently in this aspect.