Archive for » Juli, 2009 «

Mittwoch, Juli 15th, 2009 | Author: jean

A company i’m working for asked me to write a php script which is autoinstalling software like wordpress, gallery2, etc. I nearly finished that script, the only thing which is still missing is the “free-space” check. This is because it’s not simply just checking for the free space, in fact i have to check for quotas, if they exist, too. However, that was the reason why i played around with quotas.

First of all i enabled quota support in the Kernel. Then i added “usrquota,grpquota” to the options in /etc/fstab. After that i created the files quota.user and quota.group on / (which is the device i’m trying to work with quota on) and rebooted (-o remount was not working). Now back online i issued “quotacheck -avug” to the box and got:
more…

Category: Linux  | Leave a Comment
Montag, Juli 13th, 2009 | Author: jean

I guess there are quite a few libraries/classes for caching purposes around in the world wide web. However, back in 08′ i came up with a little class for caching purposes within PHP. Originally this file was part of a Content Management System i was writing at that time.

Features

  • Caching of Objects (Not only pages)
  • Setting of a timelimit for caching
  • Sha1Sum Checks (Prevents broken/modified cached objects)
  • Cached objects are stored as bz2

more…

Sonntag, Juli 12th, 2009 | Author: jean

Ago some months a friend asked me to write a little Tool which is fetching Keywords from a Website for further processing, like analyzing the keywords and having a “guess” what searchengines “may” see. Shame on me that i’ve been that late with that script, but well, here it is and it’s of course open source and freely available to everyone. By the way, i’m referring to keyword as for all found words in a document (html page) – Not just for meta-keywords.

The Script is simple, you’re just including it and feed it with a website uri:

array getKeywords ( string $uri , integer $min )
$uri is the URL
$min is a Integer which sets the amount of “repeats” of a keyword to be displayed. 2 is usually a good choice – 1 will display all.

Return an array containing all found keywords with a integer value “how often” the keyword was found

<?php

    include('getKeywords.php');
    var_dump(getKeywords($uri, 2));

?>

Another example usage

<?php

    include('getKeywords.php');

    $array = getKeywords($uri, 2);

    foreach($array as $keyword => $amount)
        echo $amount." - ".$keyword."";

?>

Of Course in both examples you have to set $uri to the page which should be checked. Sorry for the waiting time Chris. Finally… Here you go :-)

Download
The Script is available for download and is licensed under the GPLv3. You can download it from here (tar.bz2). or from here as .zip.

And now?
Well. You could use those Keywords and look in Google Trends or Keyword Suggestion Tools to optimize them a bit. You could also make sure that you don’t repeat words too much. Important words should be repeated (which does not mean writing 100 times “hello” will rank you the 1st with the search word 100). I just say: If the word “house” is repeated 3 times, it’s more important than a word which is only repeated 1 time.