4
Oct
Posted in qwerty | No Comments »
a really nice and easy way to copy or download large files.
using this method you will not need to use wget or other system calls – and you will not hit your servers memory limit
<?php
$src = fopen($in, 'r');
$dest = fopen($out, 'wb+');
stream_copy_to_stream($src, $dest);
?>
Tags: download, php, tip
22
Sep
Posted in qwerty | No Comments »
most of you needing this feature already know of it, but hey it’s cool, easy and maintainable
resources: one, two and tree
Tags: memcached, php, sessions
15
Sep
Posted in qwerty | No Comments »
igen en post om ting jeg aldrig kan huske.
preg_match_all('~(?:/xyz/)?(.+)~', $subject, $matches);
her er du kun interesseret i at få sidste matchgruppe med i $matches, så derfor er første matchgruppe prefixet med “?:” – hvilket gør at det bliver ignoreret i selve resultatsættet.
Tags: php, regex
27
Oct
Posted in qwerty | 2 Comments »
well well well… the namespace seperator for php5 is now a “\” i’m not sure i like/approve of the decision, i would have voted for “:::” or “.” but hey
you can find more info here:
i guess we will just have to live with this
Tags: namespace, php
21
Oct
Posted in qwerty | No Comments »
vi så det godt demonstreret i paris da vi var på symfonykursus, men det er fame fed.
Tags: php, symfony, test
20
Oct
Posted in qwerty | No Comments »
en slide om batch processing med php/mysql/cron fra php|tek – syntes lige jeg ville dele
Tags: cli, cron, php