Drupal imagecache do not cache, render text from url

Changes to imagecache.module

function imagecache_cache() {
    $args = func_get_args();
    $preset = check_plain(array_shift($args));
    $path = implode('/', $args);

//delete file if it already exists
$dst = imagecache_create_path($preset, $path);
$root_path=realpath(drupal_get_path('module', 'node').'/../../');
@unlink($root_path . '/' . $dst);

    _imagecache_cache($preset, $path);


Changes to drupal .htaccess

#all request to image cache must be proccessed with drupal
#no matter is file already exists
RewriteCond %{REQUEST_URI} ^.*/imagecache/.*/.*$
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !=/favicon.ico
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Now every request to imagecache will be processed again and again, try to add Add Text action with following params:

return isset($_REQUEST['t']) ? $_REQUEST['t'] : 'No text'

Do not forget to check Evaluate Text as PHP code

Now you can open urls like:


Each time you will get new image with new text.

Now time for imagecache_external module, version 1, not 2. With it you will be able to do same things to external images, just make some changes to url like this:


Notice: Question marks (?) in image url must be replaced to %3F