Posts Tagged php

stream_copy_to_stream

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);
?>

php sessions and memcached

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

fravælge matchgrupper i preg_match

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.

php batch processing articles

Posted in qwerty | No Comments »
  1. a slide from php|tek 2008
  2. an article on running background jobs in php

namespace seperator in php

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

endnu en grund til at bruge symfony

Posted in qwerty | No Comments »

vi så det godt demonstreret i paris da vi var på symfonykursus, men det er fame fed.

batch processing med php/cron

Posted in qwerty | No Comments »

en slide om batch processing med php/mysql/cron fra php|tek – syntes lige jeg ville dele