Archive for the ‘PHP’ Category.
3rd February 2001, 02:53 pm
I’ve just received three free certificates from
Brainbench, an online provider of
certification in a number of different categories. The three certificates
look quite nice — they’re printed on nice thick paper and two of them
has a “golden” star with the word “Master” on them :-)
I took a test in PHP, one in Linux Administration (Red Hat) and one in
Internet Concepts. You can see my score here. The tests
are quite long, and some of the questions are very difficult. When I took
the PHP-test, I was asked all sorts of silly questions about functions you use
with other databases than MySQL. It would have
been nice if I could have indicated, that I only use MySQL.
2nd February 2001, 08:43 pm
Gimpster.com is now one year old — I know this because I’ve just received
the bill for the next six months :-)
After I’ve made PHP Weather and my PHP
Tutorial, I’ve received tons of positive
feedback — thanks a lot. Those two projects together with the other
things I have here at Gimpster.com have also made it possible for me to
serve almost 100,000 pages the first year. Amazing!
20th December 2000, 09:26 pm
It’s been somewhat quiet here at gimpster.com for a while. I haven’t had
time to finish the new version of PHP Weather
yet, because I’ve been busy doing other things like homework and some paid
programming. That’s right — you can actually be paid to program :-) One
could arguge that it’s more interesting to program PHP
Weather, but it simply pays better to program
for other people :-)
23rd November 2000, 09:30 pm
I’ve been working on PHP Weather today. And I
have actually made some progress :-)
The print_pretty_en()
function has been improved, and can now be
customized by supplying the right arguments. Two arguments control the
HTML-code that will be inserted in front of and after all numbers. This
makes it easy to color all numbers red or do other things like that.
Another argument controls the format of the numbers. This argument can be
one of these values: ‘both_metric
‘, ‘both_imperial
‘, ‘only_metric
‘
or ‘only_imperial
‘. So if it’s ‘both_imperial
‘, all values will be
printed with the imperial form first, and the metric second in
parenthesis.
This new and substantially cooler version of PHP Weather
is not quite finished, but it’s getting closer. So stay tuned! :-)
24th October 2000, 05:46 pm
I know that I haven’t been updating this page so often lately, but I’ve
been busy with other things. One of those things is my new menu-system.
The main requirement for the new system was, that it should be able to deal
with a tree of pages several levels deep. The new system handles this
beautifully, as you can see at the sitemap. Notice how the lists are nested
within each other. The most extreme case is at the bottom, where I use five
levels to describe the structure of my Danish Stuff.
To define this structure, I have all the pages specify their parent and
their children. All pages have a parent, but does not necessarily have any
children. I store all this information in a huge array, which means that it
is extremely easy to access the information.
Because all the pages have a reference directly to their parent, it’s quite
easy to find your way back to the root of the tree. All you have to do, is
to use a recursive function. This function takes one argument: the node
who’s parent we want to find. So the function just adds the node to a
global array, and then it calls itself with the parent as an argument.
This means that you’ll eventually reach the root, where the parent will be
an empty string (''
). It’s called recursion because we have a function
that keeps executing itself until some condition has been met. Because I
can now use recursion, the code needed to build the sitemap, has
been cut in half.
The next task, is to make some tools to make it easier for me (and
eventually also others) to maintain the structure. I’ll let you know when
it’s ready.