Category Archives: Web

Fractions in PHP and whole numbers

I have been searching for a good PHP class for fraction handling and found Math_Fraction in the PEAR database. However, it was still lacking a possibility to display the whole numbers of a fraction and I had to rewrite the … Continue reading

Posted in php, Web | Leave a comment

php strpos array

I needed a PHP function to check whether a string contained one of the array values. As we know strpos does’t accept input as an array so I had to tweak it  bit. Below is an example of what I … Continue reading

Posted in Web | 2 Comments

FPDF polskie wolne czcionki

Postanowiłem wreszcie trochę uporządkować czcionki używane do generowania dokumentów pdf oraz obrazków wykorzystujących czcionki ttf. Załączam zestaw gotowej do zainstalowania czytelnej czcionki z pakietu liberation-fonts. Które są upowszechnione na licencji GPL. Pobierz

Posted in Linux, Web | Tagged | 2 Comments

Suhosin and maximum $_POST variables limit

I had a problem of more than 200 $_POST variables in one of my php scripts. Something was limiting the script not to process more than 200 in the $_POST array. After unsuccessfully trying to find some info about how … Continue reading

Posted in Web | Tagged , , , , , | 2 Comments

Suhosin – customize php security

I was trying to configure my virtualhosts to have different php options regarding shell access. After some research I came up with Suhosin solution, which solved problems with setting disable_functions per virtualhost. Look it up!

Posted in Web | Leave a comment

A php function to return random values

I was looking for a method in php that would return unequal numbers using the rand() function. I found an answer on php.net and all credit goes to alishahnovin at hotmail dot com. The method is as follows: function randiff($min, … Continue reading

Posted in Web | Tagged , , | 1 Comment