Guest User

Untitled

a guest
May 4th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. // Initiliaze and do initial cache test
  2. function __construct() {
  3.  
  4. $this->db_host = 'localhost';
  5. $this->db_user = '';
  6. $this->db_pass = '';
  7. $this->db_name = '';
  8.  
  9. $this->user = $_GET['user'];
  10. $this->filename = '/tmp/tmp.png';
  11. // Check to see if Image is already cached. If not, begin generation process.
  12. // Else, begin recall process.
  13. $this->cached = $this->Cached();
  14.  
  15. if(!$this->cached) {
  16. // Create the image (not cached)
  17. $this->createImage();
  18. }
  19.  
  20. else {
  21. // Recall the image (cached and does not need to be updated).
  22. $this->recallImage();
  23. }
  24. }
Add Comment
Please, Sign In to add comment