Roumazeilles.net

Archive for the 'PHP' category


WordPress and moving from PHP4 to PHP5

(Friday, August 24th, 2007)

WordPress v2.2Some advice provided by Donncha for those who would like to move from PHP4 to PHP5 on a server supporting WordPress exploitation. Nothing big, but it is always good to check the items she points at:

  • Location of PHP.INI
  • Update to mysql and gd libraries
  • Compatibility with WP-cache

Script for 404 random page found

(Thursday, June 14th, 2007)

Some people have been wondering how I did the random selection of 404 page not found messages that are used on this web site.

So, here is the nice little PHP script that I use here to redirect randomly to one of the right pages:

  1.  
  2. <?PHP
  3.         $address_list = array(
  4.                 "/404/404-01.php",
  5.                 "/404/404-02.php",
  6.                 "/404/404-03.php",
  7.                 "/404/404-04.php",
  8.                 "/404/404-05.php",
  9.                 "/404/404-06.php",
  10. /*              "/404/404-07.php",      */
  11.                 "/404/404-08.php",
  12.                 "/404/404-09.php",
  13.                 "/404/404-10.php",
  14.                 "/404/404-11.php",
  15.                 "/404/404-12.php",
  16.                 "/404/404-13.php",
  17.                 "/404/404-14.php",
  18.                 "/404/404-15.php",
  19.                 "/404/404-16.php",
  20.                 "/404/404-17.php",
  21.                 "/404/404-18.php",
  22.                 "/404/404-19.php",
  23.                 "/404/404-20.php",
  24.                 "/404/404-21.php",
  25.                 "/404/404-22.php",
  26.                 "/404/404-23.php",
  27.                 "/404/404-00.php"
  28.         );
  29.         srand((double)microtime()*1000000);
  30.         $randomtopic = rand(0,count($address_list));
  31.         header(‘Location: ‘.$address_list[$randomtopic]);
  32.         exit;
  33. ?>

You can re-use it on your own web site if you want to. It’s free.

Fight SPAM and scan books

(Monday, May 28th, 2007)

It is well known that the human brain has pattern matching capabilities much further advanced than those of the best equivalent software programs. This explains that failure rates of OCR (Optical Character Recognition) program may be as high as 1% (or even 2%) of errors, which is requiring later human proof-reading to ensure a reasonable quality for document scans. But when the document is old, badly printed, or degraded, error rates may climb further into the unusable (even more so when we address the scan of thousands of documents like is done by libraries and cultural institutions all over the world).

On another issue, the SPAM problem on the Internet became a major problem: Prorams try to make believe that they are human beings in order to insert advertisment anywhere a user can write (in the messages of a forum, in the comments of a blog, etc). For some time now, it became common that human users must identify themselves by their capacity to recognize a badly written word. Theoretically, this is a very efficient Turing test allowing to differentiate a human from a machine only by the results of their actions. Practically, the abilities of software programs have become so impressive that SPAM is slowly coming back again through those filters named CAPTCHAs (those images that you must read and copy back in order to be identified and approved for a specific action).

The problem appears to be: create CAPTCHA tremendously difficult for the automated software and, simultaneously, bring human beings to the task of checking scans of documents difficult to read by program.

The solution: reCAPTCHA.

reCAPTCHA - example/exemple

The idea is to provide a CAPTCHA service to thousands of bloggers and forum administrators (WordPress, phpBB, etc.) Users are invited to recognize two words specifically difficult to read (profesional OCR programs failed during scans done by Carnegie Mellon University). The user must recognize them both. One is used to check that this is a human being, the other will fill a database of OCR translations that will be used to deliver even more CAPTCHAs and to improve the quality of a document scanned by Carnegie Mellon. Dual core technology: efficiently fight spammers and deliver millions of human users to improve the scan quality of thousands of ancient documents (without using slave labor).

Example of a difficult to read/scan document:

Example of a really difficult scan (reCAPTCHA)

One of the key advantages is that most pro OCR programs can tell when they fail to recognize a character or a word (when they are not confident enough).

Top 10 anti-censorship methods

(Thursday, May 3rd, 2007)

More and more often, accessing the Internet becomes limited by the presence of censoring tools and methods (and I am not speaking of those countries where this has been institutionalized like China, Iran or Tunisia). It may be to avoid your spending too much time idling instead of working or it may be to ensure that you do not access to “questionable material”. But the Internet is highly flexible in nature and there may be good solutions to avoid this censorship.

10 - Go to the IP addresss

Instead of connecting through the domain name (example.com), you could connect directly to the IP address (192.168.0.15). It the network stops you at the DNS level, this will allow you to reach the site.

9 - Go to the Google cache

As you certainly know, the Google search engine offers “cached” links after most of its results. Since those are copies of the original web site located on Google servers, it is convenient.

8 - Go to Google mobile search

Google mobile search is made for mobile phone users, but it can be used by countless others.

(more…)

Display code in WordPress

(Saturday, April 21st, 2007)

WordPress v2.1When, as I do, you want to include some bits and pieces of software code in a WordPress post, it starts to become a serious headache. As a matter of fact, WP has not really been prepared for this and it creates a number of issues. Those I already encountered here:

  • The <?php tend to disappear (unless you start juggling)
  • Some charcaters would not display at all (or badly)
  • The overall presentation is pretty bland if you use <code>

So, I looked for a plugin (nearly everything in WordPress is done by adding on of those marvellous little code gems that can be included in a few seconds into the basic configuration) adapted to this task, easy to install (I don’t want to be stuck with heavy maintenance just for this), easy to use.

Here is the summary of what I checked and my opinion regarding them.
(more…)

FireFox with a Google toolbar

(Thursday, April 5th, 2007)


101 freeware and shareware programs

(Sunday, March 25th, 2007)

Software programs to do anything you want with your PC if you are a bit more geeky than most but do not want to pay much. Freeware & shareware.


http://www.roumazeilles.net/

Copyright (C) 1999-2008 - Yves Roumazeilles (all rights reserved)

Latest update: 24-jun-08

Google.com
Roumazeilles.net
Roumazeilles.net