~jstys-z/helioviewer.org/client5

« back to all changes in this revision

Viewing changes to scripts/precache-tiles/cacheTile.php

  • Committer: Keith Hughitt
  • Date: 2012-06-12 20:18:46 UTC
  • Revision ID: keith.hughitt@gmail.com-20120612201846-k3nm2g2sznpfumhc
Added latest movies page

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/php
 
2
<?php
 
3
    /**
 
4
     * TODO 02/03/2010: Since cache directory creation is now done primarily during the
 
5
     * getClosestImage request, when precaching we must create cache directories as needed:
 
6
     *  
 
7
     *      if (!file_exists($filepath)) {
 
8
     *          mkdir($filepath, 0777, true);
 
9
     *          chmod($filepath, 0777);
 
10
     *      }
 
11
     *       
 
12
     * (It may be useful to limit amount of checks by doing once per directory, rather than once
 
13
     *  per tile)
 
14
     *  
 
15
     *  Note: Make sure /cache directory and it's children have proper ownship (e.g. user:www-data).
 
16
     */
 
17
        require_once('../../settings/Config.php');
 
18
        require('../../api/lib/helioviewer/Tile.php');
 
19
        $id      = $argv[1];
 
20
        $zoom    = $argv[2];
 
21
        $x       = $argv[3];
 
22
        $y       = $argv[4];
 
23
        $ts      = 512;
 
24
        $display = false;
 
25
 
 
26
        $trash = new Tile($id, $zoom, $x, $y, $ts, $display);
 
27
?>
 
28