Advertisement
Guest User

Untitled

a guest
Aug 16th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. <?
  2. error_reporting(0);
  3. header('HTTP/1.1 204 No Content');
  4. header('Content-Length: 0',true);
  5. header('Content-Type: application/javascript',true);
  6. header('Cache-Control: max-age=0');
  7. header('Expires: Sun, 09 Sep 1980 16:29:29 GMT');
  8. flush();
  9. if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false)
  10. {
  11. }
  12. else {
  13. if (file_exists('/home/yair/count_file.txt'))
  14. {
  15. $fil = fopen('/home/yair/count_file.txt', r);
  16. $dat = fread($fil, filesize('/home/yair/count_file.txt'));
  17. echo $dat+1;
  18. fclose($fil);
  19. $fil = fopen('/home/yair/count_file.txt', w);
  20. fwrite($fil, $dat+1);
  21. }
  22. }
  23. if (file_exists('/home/yair/count_all.txt'))
  24. {
  25. $full = fopen('/home/yair/count_all.txt', r);
  26. $dato = fread($full, filesize('/home/yair/count_all.txt'));
  27. echo $dato+1;
  28. fclose($full);
  29. $full = fopen('/home/yair/count_all.txt', w);
  30. fwrite($full, $dato+1);
  31. }
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement