Archive for the ‘Web’ Category
Thursday, March 26th, 2009
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 did:
function strpos_array($string, $values) {
$hits = 0; ...
Posted in Web | 2 Comments »
Monday, January 19th, 2009
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 | No Comments »
Wednesday, April 23rd, 2008
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 to change it in php.ini or apache.conf I found a solution ...
Posted in Web | 2 Comments »
Wednesday, April 9th, 2008
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 | No Comments »
Saturday, September 22nd, 2007
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, $max, $num) {
if ($min= $num && $num>0) ...
Posted in Web | 1 Comment »