Advertisement
Guest User

Untitled

a guest
Nov 28th, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <?php
  2. ini_set('max_execution_time', 0);
  3. ini_set('memory_limit', '2048M');
  4.  
  5. define('DIR_APPLICATION', str_replace('\\', '/', realpath(dirname(__FILE__))) . '/');
  6.  
  7. if ((isset($_GET['plik']) && file_exists(DIR_APPLICATION . $_GET['plik'])) && isset($_GET['kod'])) {
  8. $lines = file(DIR_APPLICATION . $_GET['plik']);
  9.  
  10. foreach ($lines as $line) {
  11. $parts = explode(',', $line);
  12.  
  13. if (isset($parts[1])) {
  14. $parts[0] = trim($parts[0]);
  15.  
  16. if ($parts[0] == $_GET['kod']) {
  17. echo trim($parts[1]);
  18.  
  19. exit();
  20. }
  21. }
  22. }
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement