Advertisement
Guest User

Untitled

a guest
May 30th, 2015
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. <?php
  2.  
  3.     header('Content-type: image/jpeg');
  4.     header('Refresh: 1; URL=http://leethax.xyz/cam.php');
  5.     $ji = imagecreatefromjpeg('cam.jpeg');
  6.     $white  = imagecolorallocate ($ji, 0xff, 0xff, 0xff);
  7.     $red = imagecolorallocate($ji, 0xff, 0, 0);
  8.     $green = imagecolorallocate($ji, 0, 0xff, 0);
  9.     imagestring($ji, 5, 5, 5, 'CAM 0 - SKYLINE',$white);
  10.     imagestring($ji, 5, 5, 20, date(DATE_RSS), $white);
  11.     if(!file_exists('online'))
  12.     {
  13.         imagestring($ji, 5, 5, 460, 'Offline', $red);
  14.     }else{
  15.         $wr = '';
  16.         if(time() % 10 == 0)
  17.         {
  18.             $day = date('jFY');
  19.             if(!file_exists('/var/shared/cam/2/'. $day))
  20.                 mkdir('/var/shared/cam/2/' . $day);
  21.             imagejpeg($ji, '/var/shared/cam/2/' . $day .'/' . time() . '.jpg');
  22.             $wr = '*';
  23.         }
  24.                 imagestring($ji, 5, 5, 460, 'Online ' . $wr, $green);
  25.     }
  26.     imagejpeg($ji);
  27.     //echo file_get_contents('cam.jpeg');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement