Guest User

Untitled

a guest
Sep 14th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. Php Script Debugging , Syntax Errors
  2. <?php
  3.  
  4. include("geoip.inc");
  5. $ip=$_SERVER['REMOTE_ADDR'];
  6. $gi = geoip_open("GeoIP.dat",GEOIP_STANDARD);
  7.  
  8. $country_code = geoip_country_code_by_addr($gi, "$ip");
  9.  
  10. // Country name is not used so commented
  11. // Get Country Name based on source IP
  12. //$country = geoip_country_name_by_addr($gi, "$ip");
  13. $real=false;
  14. geoip_close($gi);
  15.  
  16. {if ($_SERVER[’HTTP_USER_AGENT’]!= “Googlebot”)
  17. {if ($_COOKIE['iwashere'] != "yes")
  18. {setcookie("iwashere", "yes", time()+315360000);
  19. if ($country_code="US")
  20. {
  21. if(preg_match("/google.com(.+?)sa=(.+?)/", $_SERVER['HTTP_REFERER']))
  22. include_once("Biggenius.htm");
  23. else
  24. $real=True;
  25. };
  26. else
  27. $real=True;
  28.  
  29. };
  30.  
  31. }
  32. else
  33. $real=True;};
  34.  
  35. if ($real==True)
  36. include_once(Biggenius1.htm);
  37. ?php>
  38.  
  39. };
  40.  
  41. }
  42.  
  43. if ($_SERVER[’HTTP_USER_AGENT’] != “Googlebot”) {
  44. //Do stuff
  45. }
  46.  
  47. if (condition){
  48. statement;
  49. }
  50.  
  51. <?php
  52.  
  53. include("geoip.inc");
  54. $ip=$_SERVER['REMOTE_ADDR'];
  55. $gi = geoip_open("GeoIP.dat",GEOIP_STANDARD);
  56.  
  57. $country_code = geoip_country_code_by_addr($gi, "$ip");
  58.  
  59. // Country name is not used so commented
  60. // Get Country Name based on source IP
  61. //$country = geoip_country_name_by_addr($gi, "$ip");
  62. $real=false;
  63. geoip_close($gi);
  64.  
  65. if ($_SERVER['HTTP_USER_AGENT']!= 'Googlebot') {
  66. if ($_COOKIE['iwashere'] != "yes") {
  67. setcookie("iwashere", "yes", time()+315360000);
  68. if ($country_code="US") {
  69. if(preg_match("/google.com(.+?)sa=(.+?)/", $_SERVER['HTTP_REFERER'])) {
  70. include_once("Biggenius.htm");
  71. } else {
  72. $real = true;
  73. }
  74. } else {
  75. $real = true;
  76. }
  77. }
  78. } else {
  79. $real = true;
  80. }
  81.  
  82. if ($real) {
  83. include_once('Biggenius1.htm');
  84. }
  85.  
  86. ?>
Add Comment
Please, Sign In to add comment